xargs
Here is a really straightforward example of using xargs,
- -t will show you what xargs is about to execute before it executes it.
...
- -n1 limits the arguments passed by the directory to pass one argument, in this case one file name at a time.
Code Block |
---|
Tin-Phams-iMac:PC tinpham$ ls | xargs -t -n1 md5 md5 bash MD5 (bash) = ab5970d50d67bcafe5c554387f76534e md5 cat MD5 (cat) = cdefa50d737dfcf8dc57886ea1a758c4 md5 chmod MD5 (chmod) = f0a9df78aef5b1ebf3512fc278a0474d md5 cp MD5 (cp) = 9b7379852c18e2519ed15f2ab6e51d57 Tin-Phams-iMac:bin tinpham$ |