[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to write a script that recursively check files in a directory with md5sum



Hello

j smith (<rootof3@yahoo.com>) wrote:

> md5sum checks one file a time. i want a script that
> recursively check files in a directory.Thanks!

Something like

find /usr -xdev -type f -name "*" -printf "\"%p\" \n" | xargs md5sum >\
usr.md5

or (untested)

find /usr -xdev -type f -print0 | xargs -0 md5sum > usr.md5

should work. See the find man page to see what the parameters do.

best regards
        Andreas Janssen

-- 
Andreas Janssen <andreas.janssen@bigfoot.com>
PGP-Key-ID: 0xDC801674 ICQ #17079270
Registered Linux User #267976
http://www.andreas-janssen.de/debian-tipps.html



Reply to: