FSlint is a small GUI application that helps you identify and clean your system of redundant files.
Install FSlint from the Ubuntu Software Center, or from the command line as follows:
sudo apt-get install fslint
(On my system, installing FSlint did not pull in additional dependencies. Specifically, fslint depends on findutils, python, and python-glade2, which should all be on your system already. You can remove FSlint using the Software Center or by typing
sudo apt-get autoremove --purge fslint in a terminal).
Searching for Files
Launch FSlint from the Unity Dash.
Here is a screen-shot of the main screen. There are many advanced features, but basic usage of the application is relatively straightforward.
Add button at the top left to add all the directories you would like to check. Obviously, you can remove directories using the
Make sure the
recurse? check-box at the the right is selected. Then click the
Find button. (Any errors, such as file permission issues, will be printed at the bottom of the FSlint window).
FSlint will list all of the duplicate files, their directory locations, and the file date. FSlint also presents you with the number of bytes wasted due to the redundant files.
Now you can select multiple files using the Shift or Ctrl keys and left mouse button. If you want to select multiple files automatically, click on the
Select button and you will be given options such as selecting files based on date, or entering wild card selection criteria.
If you need to use the list of selected files outside of FSlint (perhaps as input to your own script) click on the
Save button to save a text file.
Finally you can delete the selected files using the
Delete button, or you can merge the selected files using the
Merge button. Note that the
Merge feature removes the unselected files from your system and creates hard links to the corresponding selected files. You would use this feature if you wanted to keep your existing file structure, but wanted to free up some space on your system.
Additional Features & Documentation
FSlint has other powerful features which are accessible from the tabs in the left pane. I have found
Name clashes to be useful where there are files that have the same name, but are different (perhaps because you saved a newer version of a file in a different directory).
There is also an
Advanced search parameters tab at the top of the FSlint window that allows you to exclude certain directories in your search, or filter your results using parameters.
There a re a lot of powerful features in this simple little tool. It may save you the effort of having to write and debug a script. You can find out more at http://www.pixelbeat.org/fslint/. Here is a direct link to the English guide: http://en.flossmanuals.net/fslint/.