On Wed, 2005-03-23 at 14:31 -0700, Charles Curley wrote:
> find -iname "*.csv" | xargs tar -cvjf archive.tar.bz2

/me puts on his BOFH hat

Heh, just shot down another suggestion on #utah a bit ago. Man, I'm
going to have to write this on correctly soon. But still too lazy to do
so. The previously suggested find -exec will work, albeit a bit slowly.

The example you show is dangerous. xargs may have to run the command
more than once, whacking the partially completely backup. Safer would be
to stop doing a one liner.

echo > backup.tar
find | xargs tar

Of course, the problem won't show up until your backup is large enough
to make discovering the problem more potentially disastrous.

-- 
Stuart Jansen                   e-mail/jabber: [EMAIL PROTECTED]

"XML is like violence: if it doesn't solve your problem, you aren't
using enough of it." - Chris Maden


Attachment: signature.asc
Description: This is a digitally signed message part

.===================================.
| This has been a P.L.U.G. mailing. |
|      Don't Fear the Penguin.      |
|  IRC: #utah at irc.freenode.net   |
`==================================='

Reply via email to