[Nottingham] REading filesystem into MySQL query

Martin martin at ml1.co.uk
Thu Oct 20 12:59:02 BST 2005


Martin Garton wrote:
> On Thu, 2005-10-20 at 12:08 +0100, Martin wrote:
> 
>>OK, who can do that as a one-liner?
> 
> Actually, is can be improved. (After reading man uniq)
> 
> find  -type f | xargs md5sum  | sort | uniq -D -w32
> 
> note the capital "D"
> 
> It works, but is clearly not the fastest since it runs md5sum on
> everything.

Good one! I'd used "sort -u" and then other trickery.

The "find - xargs" is a neat trick.


This is Linux: There must be more other ways to do this! ;-P

Cheers,
Martin

-- 
----------------
Martin Lomas
martin at ml1.co.uk
----------------



More information about the Nottingham mailing list