tar noob question
sjansen at buscaluz.org
Wed Mar 23 15:04:06 MST 2005
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: sjansen at buscaluz.org
"XML is like violence: if it doesn't solve your problem, you aren't
using enough of it." - Chris Maden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://plug.org/pipermail/plug/attachments/20050323/c14efef6/attachment.bin
More information about the PLUG