On Tue, May 17, 2005 at 11:15:22AM -0500, 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. Try: find /usr/local/sites/ -iname '.SPAM*' -exec tar cjvf {} spam_20050517.tar.bz2 \; I think that you should be able to avoid using xargs. If that doesn't work, try looking at the manual page for xargs - I don't know xargs very well, but I would think that tere would be an option that would work. -- Jim Crumley |Twin Cities Linux Users Group Mailing List (TCLUG) Ruthless Debian Zealot |http://www.mn-linux.org/ Never laugh at live dragons |