I want to know how I can send the command(s) spawned by xargs to background.
For example, consider
find . -type f -mtime +7 | tee compressedP.list | xargs compress
I tried
find . -type f -mtime +7 | tee compressedP.list | xargs -i{} compress {} &
.. and as unexpected, it seems to send xargs to the background instead?
How do I make each instance of the compress command go to the background?
For SunOS you may have a look at GNU Parallel http://www.gnu.org/software/parallel/
It has the added benefit of not terminating incorrectly if the filename contains ‘ ” or space. Adding -j+0 will make it run one compress per CPU core.