Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.3: Create icon previews and more in the Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Create icon previews and more in the Terminal
Authored by: fxt on Nov 24, '03 10:33:56PM

> it would be nice if sips could walk a directory structure
> instead of having to babysit each folder.

if one has a bunch of folders with jpg images in them, then

% find . -iname "*.jpg" | xargs sips -i

will traverse the directory structure and add icon previews to each jpeg image.

fxt



[ Reply to This | # ]
10.3: Create icon previews and more in the Terminal
Authored by: dahjelle on Nov 25, '03 11:50:11PM

I had spaces in several of the file and directory names. This confused xargs because it, by default, uses spaces as the delimiters between file names. If you use

find . -iname "*.jpg" -print0 | xargs -0 sips -i
instead, find will delimit the file names with a '\0' and xargs will use the same character to send the arguments to sips.

Enjoy!



[ Reply to This | # ]