How to find and delete duplicate files in Linux: FSlint

Source: Internet
Author: User

How to find and delete duplicate files in Linux: FSlint

Hello everyone, today we will learn how to find and delete duplicate files on a Linux PC or server. Here is a tool you can use as needed.

Whether you are using a Linux desktop or server, there are some good tools that can help you scan duplicate files in the system and delete them to free up space. The GUI and command line interface are available. Duplicate files are unnecessary waste of disk space. After all, if you really need to share the same file in different locations, you can use soft links or hard links to store data in one disk.

FSlint

FSlint is available in binary repositories of different Linux distributions, including Ubuntu, Debian, Fedora, and Red Hat. You only need to run your package manager and install the "fslint" package. By default, this tool provides a simple graphical interface with command line versions that also contain various features.

Do not worry that the graphic interface of FSlint is too complex. By default, it automatically selects the Duplicate pane and uses your home directory as the search path.

To install fslint, if I run Ubuntu like this, here is the default command:

  1. $ sudo apt-get install fslint

Here are the installation commands for other releases:

Debian:

  1. svn checkout http://fslint.googlecode.com/svn/trunk/ fslint-2.45
  2. cd fslint-2.45
  3. dpkg-buildpackage -I.svn -rfakeroot -tc
  4. sudo dpkg -i ../fslint_2.45-1_all.deb

Fedora:

  1. sudo yum install fslint

OpenSUSE:

  1. [-f /etc/mandrake-release ]&& pkg=rpm
  2. [-f /etc/SuSE-release ]&& pkg=packages
  3. wget http://www.pixelbeat.org/fslint/fslint-2.42.tar.gz
  4. sudo rpmbuild -ta fslint-2.42.tar.gz
  5. sudo rpm -Uvh/usr/src/$pkg/RPMS/noarch/fslint-2.42-1.*.noarch.rpm

For other releases:

  1. wget http://www.pixelbeat.org/fslint/fslint-2.44.tar.gz
  2. tar -xzf fslint-2.44.tar.gz
  3. cd fslint-2.44
  4. (cd po && make)
  5. ./fslint-gui

To run the GUI version fslint-gui of fslint in Ubuntu, run the command Alt + F2 or enter:

  1. $ fslint-gui

By default, it automatically selects the Duplicate pane and uses your home directory as the search path. All you need to do is click the Find button. FSlint will automatically Find the list of duplicate files in your home directory.

Click the button to delete any files you want to delete and double-click preview.

After all this is done, we will successfully Delete the duplicate files in your system.

Note that the command line tool is not in the Environment path by default, and you cannot run it like a typical command. In Ubuntu, you can find it under/usr/share/fslint. Therefore, if you want to run a full fslint scan in a separate directory, run the following command in Ubuntu:

  1. cd /usr/share/fslint/fslint
  2. ./fslint /path/to/directory

This command does not actually delete any files. It only prints the list of duplicate files-you need to do the following on your own.

  1. $ /usr/share/fslint/fslint/findup --help
  2. find dUPlicate files.
  3. Usage: findup [[[-t [-m|-d]]|[--summary]][-r][-f] paths(s)...]
  4. Ifno path(s) specified then the current directory is assumed.
  5. When-m is specified any found duplicates will be merged (using hardlinks).
  6. When-d is specified any found duplicates will be deleted (leaving just 1).
  7. When-t is specfied, only report what -m or-d would do.
  8. When--summary is specified change output format to include file sizes.
  9. You can also pipe this summary format to /usr/share/fslint/fslint/fstool/dupwaste
  10. to get a total of the wastage due to duplicates.

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.