simple one-liner for mass md5-summing

talexb-SBdzbUvMQDunS0EtXVNi6w at public.gmane.org talexb-SBdzbUvMQDunS0EtXVNi6w at public.gmane.org
Mon Jun 14 16:02:40 UTC 2004


On Mon, 14 Jun 2004, daniel wrote:

> i've got a directory of about 20 files that i'd like to run an md5 sum on each
> and put the result into a file, so something like this:
>
> md5sum file01.tar.gz > file01.tar.gz.md5
>
> but x20.  anyone have a simple oneliner i can use for this?  everything's in
> the same directory if that helps.

I highly recommend xargs for this. Something like

  ls -1 | xargs -izz md5sum zz > "zz.md5"

(untested) should do it. xargs expands 'zz' to the file that's currently
being investigated.

Alex


--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list