How to find duplicate directories in linux?

Asked By 0 points N/A Posted on -
qa-featured

Hi,

How do I find the duplicate directories in linux? And I also wanted to clean them, can anyone provide me with the steps on how to do that? 

Thanks in advance.

SHARE
Answered By 0 points N/A #163160

How to find duplicate directories in linux?

qa-featured

If you are using Linux and you want to check your hard drive for possible duplicate folders, you can use FDUPES. This is a program used to identify and or delete duplicate files that are residing within a folder or directory.

Use this application then do this command on your machine:

fdupes -r ./folder > duplicates_list.txt

The “-r” flag is for recursivity. After executing the command, check the “duplicates_list.txt” file with notepad to see the list of duplicate files. To download FDUPES, you may visit FDUPES. You should also check this page, Tips4Linux.com – Tips and Tricks for Linux Users – Find duplicate files in Linux, for other helpful information.

Common solutions that can be found over the web are for finding and deleting duplicate files and not for folders or directories. If you’re new to Linux, try reviewing O’REILLY® linux devcenter.com and O’REILLY® linux devcenter.com — find for helpful information about different Linux commands.

Answered By 590495 points N/A #163161

How to find duplicate directories in linux?

qa-featured

If you’re on Linux and you want to locate any possible duplicate files or folders on your hard drive, there are good tools that will allow you to scan your system for duplicate files and remove them to free up some space. One example is the tool called FSlint. It is available in a variety of Linux distributions’ repositories such as Fedora, Red Hat, Ubuntu, and Debian.

To use it, simply start your package manager and install the “fslint” package. It provides a suitable graphical interface by default and also includes command-line versions of its functions. When you start FSlint, it opens with the Duplicates pane selected by default and uses your home directory as its default search path.

All you need to do is click Find and it will search a list of duplicate files in directories under your home folder. Use the available buttons to delete any files you want to remove as well as double-click them to preview them.

Related Questions