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
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:
.openoffice.org2.0/user/config/modern_en-US.sog .openoffice.org2.0/user/config/modern_sk.sog Lotus/XPD/.sodc/user/config/modern.sog .gnome2/share/cursor-fonts/fonts.dir .gnome2/share/fonts/fonts.dir .openoffice.org2.0/user/config/cmyk.soc Lotus/XPD/.sodc/user/config/cmyk.soc
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:
.openoffice.org2.0/user/config/palette_bg.soc .openoffice.org2.0/user/config/palette_cs.soc .openoffice.org2.0/user/config/palette_da.soc .openoffice.org2.0/user/config/palette_de.soc .openoffice.org2.0/user/config/palette_en-US.soc .openoffice.org2.0/user/config/palette_es.soc
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
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.