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

Feature: System Administration

Tidy up your filesystem with FSlint

By Shashank Sharma on October 30, 2007 (3:00:00 PM)

Share    Print    Comments   

Over time, a filesystem accumulates a lot of useless items. FSlint is a nifty little tool that helps you clean your filesystem by pointing out junk in the form of empty directories, corrupt symlinks, files with bad names, duplicate and temp files, and more. However, its usefulness is marred by a virtually total lack of documentation and a GUI that takes some getting used to.

Fedora and Ubuntu users can respectively use yum and apt-get to install FSlint. After installation you can launch FSlint from the Applications -> System Tools menu on a Fedora 7 machine, or launch it from the terminal window with the fslint-gui command. For those more inclined towards the command line, the /usr/share/fslint/fslint/fslint command will print out all the items FSlint was designed to look for. Your screen will be flooded with a summary of files with bad IDs, conflicting file names, temporary files, empty directories, duplicate files, and something called file name lint. However, no description accompanies all this information, so you must have some understanding of the Linux filesystem to ensure you don't render your system unusable. For example, look at these files, listed under the Duplicate files section:


While the files have similar and in some cases the same names, they are by no means duplicates, so you can't just delete them even though FSlint considers them duplicates. Also, FSlint is incapable of differentiating files such as:


If you want FSlint to display only duplicate files, use the findup tool. The command /usr/share/fslint/fslint/findup directorypath will print all the duplicate files in the specified directory. You can similarly use the other tools in the directory to find relevant files -- however, there is no documentation to describe which tool does what, so you have to spend some time getting to know these tools. I fired up fslint-gui hoping to determine what purpose each of the command-line tools serves, and discovered that the tools haven't been named with obscure abbreviations:

findup -- prints out a list of files with the same names
findsn -- prints out the symbolic links
finded -- display all the empty directories
findtf -- find all the temorary files
findns -- display all the non-stripped binaries (binary packages that have debug information built into them)
findid -- find all files with bad IDs
findws -- display all files with reduntant whitespaces in filename
findbl -- find files with dangling symlinks
findnl -- prints out all files with bad names. The list included all my XChat logs
findul -- find all the unused libraries

Using fslint-gui

If you find using the FSlint command-line tools to be a chore, launch fslint-gui. In this graphical tool there are two tabs at the top, Search path and Advanced search parameters. The program opens up in the Search path tab by default, and the entire program window is split into several panes. You can specify the search path or the directories you want to limit the search to in the topmost pane. The default directory is your system's home directory. To add another directory to the search path, click the Add button and select the new directories. FSlint looks recursively through the specified directories by default, so you don't have to specify /home/mydir/stuff/ if /home/mydir/ is in the search path. To change this behavior, uncheck the recurse? check-box on the right of the program window.

The left pane lists all the items FSlint looks for in the filesystem. To view all the empty directories in the selected directory, click the Empty directories button and then click Find. FSlint immediately gets to work and prints a list of files. To indicate it's looking for files, a small Searching... message appears just below the Find button. To delete a file, select the file and then click the Delete button on the bottom right of the search results. To the left of the Delete button is the Save button, which doesn't actually save the selected file but the search result. If you select five files from the result and click Save, FSlint will prompt you to specify a filename and then save the names of the files you selected in the specified file. The third button is the Select button, which should actually have been a drop-down list. Clicking this button has the same effect as that of clicking a drop-down list -- you are presented with a list of options: Select using wildcards, Unselect using wildcards, Toggle selection, Unselect all. You can use any wildcard to select or unselect files. For example, to select all file with en in the name, use *em*, and to select files with five-letter names, use ?????.

Some of the categories listed on the left pane have their own search options. For example, when you click the Temp files button, you can specify the minimum age for files to limit your search. FSlint can group bad symlinks into various categories, such as Dangling, Suspect, Relative, Absolute, and Redundant naming. These are listed horizontally as radio buttons when you click the Bad symlinks button. You must click Find every time you decide to view a different kind of bad symlink because FSlint doesn't refresh its search results when you click a different radio button.

You can also specify the search parameters for the find command, which FSlint uses to find the junk on your system, from the Advanced search parameters tab.


Until the developers rework the rough interface of fslint-gui, its users are at just as much of a loss with the grphical tool as with the cryptic FSlint command-line tools. The hidden and unclear search options are confusing for new users, who are not the target audience for this tool. I also find FSlint's inability to simultaneously search for different types of files to be a turn-off. FSlint may be a useful tool, but the software's lack of documentation and imperfect design make it more difficult to use than it should be.

Shashank Sharma specializes in writing about free and open source software for new users and moderates the forum boards. He is the coauthor of Beginning Fedora, published by Apress.

Share    Print    Comments   


on Tidy up your filesystem with FSlint

Note: Comments are owned by the poster. We are not responsible for their content.

Thanks for the review

Posted by: Anonymous [ip:] on October 23, 2007 12:12 PM
I'm the author of FSlint.

You got the summary of the command line tools a little wrong.

Better just take the output from `fslint --help` which is:

./fslint --help
File system lint.
A collection of utilities to find lint on a filesystem.
To get more info on each utility run 'util --help'.

findup -- find DUPlicate files
findnl -- find Name Lint (problems with filenames)
findu8 -- find filenames with invalid utf8 encoding
findbl -- find Bad Links (various problems with symlinks)
findsn -- find Same Name (problems with clashing names)
finded -- find Empty Directories
findid -- find files with dead user IDs
findns -- find Non Stripped executables
findrs -- find Redundant Whitespace in files
findtf -- find Temporary Files
findul -- find possibly Unused Libraries
zipdir -- Reclaim wasted space in ext2 directory entries

As for the GUI, it would be great if you could provide
concrete feedback as to improvements you would like to see.

Note all duplicate files should not be deleted automatically as you've mentioned,

but FSlint does not do this and presents the list to the user, on which they can do

various manual and automatic selections. I can't see what else FSlint could do?

As for running multiple searches in parallel:
FSlint is highly tuned to minimize disk head seeks.

Running multiple tools in parallel would just slow things down.

What would be useful I suppose would be to schedule a search
to run, if an existing search is running.

Then you could go off for tea after clicking find on a few tabs.

thanks again for the review,



Re: Thanks for the review

Posted by: Anonymous [ip:] on October 30, 2007 04:45 PM
Seems to me that you should focus on the command line version before jumping on the GUI bandwagon.
After you document all your code better, you could focus your time on the GUI.Thanks the GUI charm people gay.
Don'nt forget the scroooozw lock GUI peoplle tooo.

[Modified by: Anonymous on October 30, 2007 09:17 PM]



Posted by: Anonymous [ip:] on October 30, 2007 10:49 PM
There's a KDE project called KleanSweep that does the same thing.


Re: KleanSweep

Posted by: Anonymous [ip:] on October 30, 2007 10:51 PM
The webpage gives me a 404 when I click KleanSweep though, here is its KDE-Apps page just in case you guys get the same thing. PLus I'm gay.
[Modified by: Anonymous on October 31, 2007 01:14 AM]


Re: KleanSweep

Posted by: Anonymous [ip:] on October 31, 2007 07:13 AM

Tidy up your filesystem with FSlint

Posted by: Anonymous [ip:] 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.


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.



Tidy up your filesystem with FSlint in Gutsy and subseqent versions

Posted by: Anonymous [ip:] on October 31, 2007 11:30 PM
I'm using Dapper LTS Ubuntu and FSlint is not available. You need to be using at least Gutsy to try it!


Tidy up your filesystem with FSlint

Posted by: Anonymous [ip:] on November 01, 2007 01:57 AM
Basically this would be for those fairly new to linux, the type that most of the times can't even tell the difference between what files they would need and those they wouldn't. The kind that could wreak havoc on their system deleting crucial files. When you are experienced at UNIX CLI you have grep and other tools as well as just knowing how to find out which directory is using the most space(tmp, var/tmp, etc..). This is not a good tool.


There are a few options...

Posted by: Anonymous [ip:] on November 02, 2007 05:13 PM
There are quite a few programs that do this, Wikipedia has a list of the obvious ones:

Most use the same method, some add more options but the basics are the same.


Tidy up your filesystem with FSlint

Posted by: Anonymous [ip:] on December 15, 2007 05:42 PM
It's a very useful tool, but the interface sucks. This simple free old Windows program does it better: It lets you select an entire directory at once, and it will remove all duplicates within that directory, recursively. It lets you automatically mark all but one of each duplicate, too. FSlint forces you to manually check each file, which is impossible tedious if you're trying to delete thousands of files.


Tidy up your filesystem with FSlint

Posted by: Anonymous [ip:] on March 10, 2008 12:53 PM
My favorite on Windows was always Clonespy which gives you very good options to automatically choose files you wanna delete.
Unfortunately, I never got it to work with wine (it hang after finding the dupes...)


This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya