This simple task is proving harder then imagined. I have a multi-level directory that i'm trying to clean of duplicates, but I can't get 'find' to print what I need to see. To give an illustrative example, here is a dir:
Code:
stuart@stuart:~/testdir$ ls *
dir1:
level2:
dir1
So the output of find as i'd like it to work would show the two locations of dir1, which would be ./dir1 and ./level2/dir1. But no:
Code:
stuart@stuart:~/testdir$ ls -d */ | head -1 | find . "`cat`" -type d
.
./level2
./level2/dir1
./dir1
dir1/
What am doing wrong?