Skip to main content

The fdupes command finds duplicate files in a given set of directories.

# Requires Mac Ports and fdupes port.
# Install fdupes port: 
#   $> sudo port install fdupes

##
# How Do I Use fdupes?
##

# Find duplicate files in /etc/ directory, enter:
fdupes /etc

##
# How Do I Delete Unwanted Files?
##

##
# You can force fdupes to prompt you for files to preserve, 
# deleting all others (use this with care otherwise you may loss data):
##
fdupes -d /etc

##
# How Do Recursively Search Directory?
##

# You can recursively search every directory given follow subdirectories 
# encountered within the -r option, enter:
fdupes -r /dir1

##
# How Do I Find Dupes In Two Directories?
## 

# Type the command as follows:
fdupes /dir1 /dir2

# OR
fdupes -r /etc /data/etc /nas95/etc

##
# How Do I See Size Of Duplicate Files?
## 

# Type the following command with the -S option:
fdupes -S /etc