Giter Site home page Giter Site logo

Add a `find -xdev` equivalent about czkawka HOT 3 CLOSED

qarmin avatar qarmin commented on May 12, 2024
Add a `find -xdev` equivalent

from czkawka.

Comments (3)

sseering avatar sseering commented on May 12, 2024 1

-xdev will make find never leave the filesystem it started on. czkawka should do that too.

Example:

  • / is on /dev/sda1
  • /usr/share/databases is on /dev/sda2

then a search starting in /usr would look at all files recursively in /usr/ but at no files in /usr/share/databases.

Why its useful

In the current czkawka version when I want to search for duplicate files in / device then it would search /proc and /dev and /sys too. It doesn't make sense to search in these so /proc and /dev and /sys are in the excluded dirs by default.

But it also searches in /tmp which is wrong because its tmpfs so I add /tmp to the excluded dirs too and restart search.

But it also searches in /run which is wrong because its tmpfs so I add /run to the excluded dirs too and restart search.

But it also searches in /boot/efi which is wrong because its the EFI ROM so I add /boot/efi to the excluded dirs too and restart search.

But it also searches in /mnt/nfs which is wrong because its a network filesystem so I add /mnt/nfs to the excluded dirs too and restart search.

And so on .... .

Exclusion lists are like chasing an imperfect solution here. Limiting the search to one filesystem is really useful here to automatically exclude all of /proc and /dev and /sys and /run and ... and so on without needing to work on a list that will never be perfect.

from czkawka.

qarmin avatar qarmin commented on May 12, 2024

I'm not sure if I understand this correctly what this argument do.

By default find search also places at which points symbolic links, and -xdev prevents from doing this?

If yes, then this issue can be closed because Czkawka just ignore symbolic links, because they will allow to break tree hierarchy of file system, and will force to remove some directory optimizations and it will require additional step with removing duplicated same files with identical path.

from czkawka.

qarmin avatar qarmin commented on May 12, 2024

For anyone - https://doc.rust-lang.org/std/os/unix/fs/trait.MetadataExt.html#tymethod.rdev - this may be helpful

from czkawka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.