Sample Header Ad - 728x90

Find and list duplicate directories

5 votes
3 answers
6391 views
I have directory that has a number of sub-directories and would like to find any duplicates. The folder structure looks something like this: └── Top_Dir └── Level_1_Dir ├── standard_cat │ ├── files.txt ├── standard_dog │ └── files.txt └── standard_snake └── files.txt └── Level_2_Dir ├── standard_moon │ ├── files.txt ├── standard_sun │ └── files.txt └── standard_cat └── files.txt └── Level_3_Dir ├── standard_man │ ├── files.txt ├── standard_woman │ └── files.txt └── standard_moon └── files.txt With the above example I would like to see an output of: /top_dir/Level_1_Dir/standard_cat /top_dir/Level_2_Dir/standard_cat /top_dir/Level_2_Dir/standard_moon /top_dir/Level_3_Dir/standard_moon I have been doing some searching on how to get this done via bash and I got nothing. Anyone know a way to do this?
Asked by dino (51 rep)
Jun 9, 2016, 03:21 AM
Last activity: Apr 21, 2022, 12:04 AM