This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Tidy up your filesystem with FSlint

Posted by: Anonymous [ip: 76.87.205.5] on October 31, 2007 09:50 AM
With a little more digging, it is seen that fslint is a wrapper to the other tools, which may also be invoked with the --help switch to get more information. For instance:

$ ./findup --help
find dUPlicate files.
Usage: findup [[[-t [-m|-d]] | [--summary]] [-r] [-f] paths(s) ...]

If no path(s) specified then the currrent directory is assumed.


When -m is specified any found duplicates will be merged (using hardlinks).
When -d is specified any found duplicates will be deleted (leaving just 1).
When -t is specfied, only report what -m or -d would do.

When --summary is specified change output format to include file sizes.
You can also pipe this summary format to /Users/whmcclos/Desktop/fslint-2.24/fslint/fstool/dupwaste
to get a total of the wastage due to duplicates.

Examples:

search for duplicates in current directory and below
findup or findup .
search for duplicates in all linux source directories and merge using hardlinks
findup -m /usr/src/linux*
same as above but don't look in subdirectories
findup -r .
search for duplicates in /usr/bin
findup /usr/bin
search in multiple directories but not their subdirectories
findup -r /usr/bin /bin /usr/sbin /sbin
search for duplicates in $PATH
findup `/Users/whmcclos/Desktop/fslint-2.24/fslint/supprt/getffp`
search system for duplicate files over 100K in size
findup / -size +100k
search only my files (that I own and are in my home dir)
findup ~ -user `id -u`
search system for duplicate files belonging to roger
findup / -user `id -u roger`

And, of course, with a text editor (such as vi), one may easily look at the implementation of any of the commands, which are commented.

These tools are obviously geared to the UNIX command line literate user, not the GUI hand it to me pre-gurgitated user.

Enjoy.

#

Return to Tidy up your filesystem with FSlint