[Discuss] fdupes opposite?

Patrick NixNoob-sneaking at sneakEmail.com
Fri Mar 14 16:21:17 PDT 2008


On Fri, 14 Mar 2008 14:34:07 -0700
Lionel Widdifield wrote:

> On Fri, Mar 14, 2008 at 12:36:44PM -0700, Murray Strome wrote:
> > Steven Kurylo wrote:
> > >> I am looking for a utility that would be similar, except that instead of
> > >> finding and listing those files which are duplicated in a directory
> > >> tree, it would find those that are unique and list those.
> 
> md5sum `find . -type f` | sort | uniq --check-chars=32 --all-repeated=separate
> 
> md5sum `find . -type f` | sort | uniq --check-chars=32 --unique

Oooh, new toy!  :-)

Thanks, I hadn't messed with uniq, but that looks a lot cleaner
[and probably a *lot* faster].  Please forgive my ignorance.

> 
> 
> ###################
> 
> #!/bin/sh
> 
> T=/tmp/QQ.temp
> P="."
> [ -z "$1" ] || P=$1
>  
> md5sum `find "$P"  -type f` > $T
> 
> sort < $T | uniq --check-chars=32 --unique > /tmp/unique.out
> sort < $T | uniq --check-chars=32 --all-repeated=separate > /tmp/dupes.out
> 
> 
> 
> 


-- 
A princess who lived near a bog
Met a prince in the form of a frog.
	Now she and her prince
	Are the parents of quints,
Four boys and one fine polliwog.


More information about the Discuss mailing list