How To Find and Remove Duplicate Files In Linux?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/find-remove-duplicate-files-linux/
PINTEREST
PINTEREST
INSTAGRAM

Hi, long time age when I was new comer to the Linux world I was using duplicate file finder named fdupes. But after a time I change my OS to windows and again to Linux. But I stopped using fdupes. Today When I was looking to the file compression of btrfs I found fdupes again and run in my test system. It it very useful tool for untidy persons on the computer. By the way I am not untidy in my computer 🙂 . Lets look to fdupes. Fdupes looks files with their  size and MD5 and then byte by byte comparison.

Install fdupes

Ubuntu, Debian, Kali, Mint

We will install fdupes with the following command for Ubuntu, Debian, Kali, Mint.

Install fdupes
Install fdupes

Fedora, CentOS, RedHat

For yum based installation for  fdupes with the following command.

Simply Look Duplicate Files

Look current working directory with recursive style where all files folders and subfolders are looked.

Simply Look Duplicate Files
Simply Look Duplicate Files

We can see an duplicate example below. Files pass , Vide   and others all the same.

Simply Look Duplicate Files
Simply Look Duplicate Files

Following Symbolic and Hard Links

By default symbolic and hardlinks do not followed by  fdupes. We can enable  to follow sym and hard link with the -s and -H options. This can be useful if there are some link to other paths.

Show Size Information of Duplicate Files

Before deleting files we may want to list the size of duplicate files. We can use -S to list sizes  of the duplicate files.

LEARN MORE  How To Get The Size Of Directory In Linux From Command Line?

Show Size Information of Duplicate Files
Show Size Information of Duplicate Files

Delete Without Confirmation

And the most useful and dangerous command where duplicate ones are deleted. Use this command in your own risk.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/find-remove-duplicate-files-linux/
PINTEREST
PINTEREST
INSTAGRAM