
I use UNIX quite a lot but my retention rate of UNIX commands is less
than desirable so I have created a new category called "UNIX Shell" on
my blog to help me remember some of the *NIX (UNIX, Linux, etc) scripts
and commands that I have found useful.
First tip on this category is the xargs command that
used in UNIX shell to break a data stream into small enough for
commands to process. Let's suppose you want to search for MP3 files
that you have added to your music library folder in the past week and
copy them to another foler, you can issue this command:
find . -name '*.mp3' -mtime -7 -print | xargs -i -t cp {} /tmp