Fast command-line steps to locate, inspect and remove identical files with minimal risk. 15.02.2026 | reading time: 2 min You want to reclaim disk space and remove identical files quickly: fdupes is a small, command-line utility that finds duplicate files by content, so run it to discover wasted bytes and act deliberately. Quick demo Create a small demo and run fdupes to see results: ```bash mkdir -p demo/project_files echo "Hello world" > demo/project_files/a.txt echo "Hello world" > demo/project_files/duplicate_a.txt echo "Different" > demo/project_files/b.txt cp demo/project_files/b.txt demo/project_files/copy_of_b.txt fdupes -r demo/project_files ``` Sample output from the previous command: ```text demo/project_files/a.txt demo/project_files/duplicate_a.txt demo/project_files/b.txt demo/project_files/copy_of_b.txt ``` How to act safely Do this in two passes: first run `fdupes -r path` to list duplicates; inspect the groups; then use `fdupes -d path` to delete interactively, or `fdupes -dN path` to accept defaults when automating; never run deletion before you verify the lists. Options that matter Key flags to remember are recursion (`-r`) to traverse directories, interactive deletion (`-d`) to choose which file to keep, and the no-prompt mode (`-N`) to keep the first file automatically; run read-only scans first and combine with `--summarize` or similar reporting before destructive steps. Practical use cases Use fdupes to clean forum attachments, orphaned backups, duplicate photos from syncs, or files left by failed scripts; incorporate it into a maintenance script that writes reports and moves candidates to a review folder before removing them. Other tools worth trying If fdupes does not fit your needs, try `jdupes` for speed and more features, `rmlint` for aggressive cleanup and reporting, or `rdfind` when deduplication with hardlinks is desired. Next step Start with small directories, confirm behavior, then scale up; learning to manage disk hygiene with tools like fdupes is practical experience that prepares a candidate for certifications such as CompTIA Linux+ or LPIC-1 — consider the intensive exam preparation at bitsandbytes.academy to go further. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem utilities storage backup troubleshooting