Sending the command(s) spawned by xargs to background

Posted by PoorLuzer on Stack Overflow See other posts from Stack Overflow or by PoorLuzer
Published on 2009-12-23T11:35:14Z Indexed on 2010/06/10 19:02 UTC
Read the original article Hit count: 376

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about background

Related posts about xargs