Forum Discussion
How to Effectively Find and Delete Duplicate Files on Mac?
If you are a command line lover, there are also some ways to find and delete duplicate files on Mac through the command line. These methods may not be as intuitive as graphical tools, but they are flexible, fast, and can help you save storage space.
Find duplicate files with fdupes
fdupes is a very practical command line tool for finding and deleting duplicate files on Mac. It can scan duplicate files in a specified folder and provide you with the option to delete them.
1. Open Terminal and install fdupes through Homebrew:
brew install fdupes
2. After installation, use the following command to scan duplicate files in a folder:
fdupes -r /path/to/directory
Where the -r parameter means recursive scanning of folders and their subfolders.
If you are sure you want to delete duplicate files, you can use the following command:
fdupes -dN /path/to/directory
-d means deleting duplicate files, -N automatically selects the first file to keep and deletes the rest.
Advantages:
- Completely free and powerful.
- Supports recursive scanning, which can handle duplicate files in subfolders.
- Can help you find and delete duplicate files on Mac.
Disadvantages:
Requires command line operation, which may not be user-friendly for some users.
Be careful when deleting files. It is recommended to use the -r command to check duplicate files first to avoid accidental deletion.