Saturday, January 24, 2009

Piping commands to xargs

Feed the list of all those empty files to the rm command one at a time, and you're done:

$ ls -tr |xargs -t -I{} rm -f {}

==============================

ls /var/log/*.[0-9]* | xargs gzip --best

Readers who read this page, also read:




Bookmark and Share My Zimbio http://www.wikio.com

0 comments: