21 Jan
2005
21 Jan
'05
16:16
Danny Sauer wrote:
Lars wrote regarding 'Re: [SLE] Md5sum file from dir' on Fri, Jan 21 at 04:29:
On Friday 21 January 2005 11:02, Laurent Renard wrote: | Hello everyone, | | how could i make a md5sum file calculated from files stored in a | directory ( like in ftp's ... ) ?
Non-recursive: $ find <directory> -type f -maxdepth 1 | xargs md5sum > checksums.txt
If you just want all of the files in a dir, just do md5sum * > checksums.txt It'll skip directories (and warn on the sommand line for each skipped dir, unless you add a 2>/dev/null). No need to fire up find *and* xargs in that case. :)
--Danny, who generally prefers -exec to piping through xargs...
GREAT : Thanx Danny ;) -- Laurent Renard