UNIX Tips For The Elderly

- aclark
- March 6, 2008
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 …