Re: recursively find duplicate filenames
On 5.1.2011 13:15, S Mathias wrote: find duplicate filenames in a folder find | perl -ne 's!([^/]+)$!lc $1!e; print if 1 == $seen{$_}++' find duplicate filenames in a folder recursively ? how? $ sudo aptitude install fdupes -- Q: What's the difference between the 1950's and the 1980's? A: In the 80's, a man walks into a drugstore and states loudly, I'd like some condoms, and then, leaning over the counter, whispers, and some cigarettes. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d25bc6d.9020...@iki.fi
recursively find duplicate filenames
find duplicate filenames in a folder find | perl -ne 's!([^/]+)$!lc $1!e; print if 1 == $seen{$_}++' find duplicate filenames in a folder recursively ? how? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/827694.496...@web121409.mail.ne1.yahoo.com
Re: recursively find duplicate filenames
On Wed, 5 Jan 2011 03:15:01 -0800 (PST), S Mathias smathias1...@yahoo.com said: S find duplicate filenames in a folder recursively? how? It's a (pretty ugly) one-liner if you have something to reverse strings in a file. Put this in (say) /usr/local/bin/rev: #!/usr/bin/perl -n chomp; print +(scalar reverse), \n; exit(0); And then: you% cd /some/place you% find . -print | rev | cut -f1 -d/ | rev | sort | uniq -c | \ expand | grep -v ' 1 ' Or you could replace the uniq-expand-grep with some awk weirdness if you're into that. -- Karl Vogel I don't speak for the USAF or my company If men ruled the world #18: It would be perfectly legal to steal a sports car, as long as you returned it the following day with a full tank of gas. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110106024045.89094b...@kev.msw.wpafb.af.mil