Professional Python® programming and open source software consulting since 2004

Blog


Entries for date "March 2008"

UNIX Tips For The Elderly

huh

Do something to a bunch of files

I often want to do something to a bunch of files on the local filesystem. For example:

$ find Music/ | xargs -I % echo 'Do something to ' %

This works because, according to the xargs man page:

-I replstr
Execute utility for each input line, replacing one or more occurrences of replstr in up to replacements (or 5 if no -R …

Blog Now Résumé
ACLARK.NET, LLC