Go Job Hunting at the LQ Job Marketplace
Go Back > Blogs
User Name



Recursively generate MD5 checksums

Posted 10-26-2011 at 10:53 AM by Garda
Tags find, md5, md5sum, xargs

I wanted to generate MD5 checksums of a whole bunch of files in a directory. It turns out that this is not as straightforward as it should be. IMO it should be completed with: md5sum -br *

Unfortunately it was not as straightforward. I found this blog entry after searching for a while and adapted this to what I needed. To generate checksums, I used the following:

find . -type f -print0 | xargs -0 md5sum -b
(Note: for the above to work, "cd"...
Posted in Uncategorized
Views 3763 Comments 0 Garda is offline

batch resize images using find, xargs and convert

Posted 02-20-2011 at 05:30 PM by dr_agon

applies to: linux, find, xargs, convert, image processing

'convert' command, which is a part of ImageMagick package can be used for image resizing, but it lacks ability to process multiple files (in version of ImageMagick 6.5.7-8 2010-12-02). Instead of writing a shell script you can use find and xargs commands to collect filenames and invoke convert with one filename at a time, like this:

find -iname "*.jpg" -printf "%f\0" \
 | xargs -0 -I {} convert
Posted in Uncategorized
Views 4533 Comments 0 dr_agon is offline


All times are GMT -5. The time now is 11:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration