Two peices of advice:
1) don't use spaces in filenames
2) add | sed -e "s/^\(.*\)$/\'\\1\'/" | to the pipeline just before the 
xargs.


On Tue, 17 May 2005, Josh Trutwin wrote:

> I'm trying to use the following command to create an archive of all
> the SPAM folders I have on my email system:
>
> find /usr/local/sites/ -iname '.SPAM*' | xargs tar cjvf
> spam_20050517.tar.bz2
>
> There are IMAP folders called SPAM, Not Spam, etc.  The command works
> ok until it encounters something like "Not Spam" then the space trips
> the command up.
>
> tar: /usr/local/sites/www.davidtrutwin.com/users/dlt/.spam.Not: Cannot
> stat: No such file or directory
> tar: Spam: Cannot stat: No such file or directory
>
> It's trying to archive the maildir:
>
> /usr/local/sites/www.davidtrutwin.com/users/dlt/.spam.Not Caught
>
> But the space in the filename is causing problems.
>
> Is there an easy fix to this?
>
> Thanks,
>
> Josh
>
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> tclug-list at mn-linux.org
> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>
>