On Thu 31 May 2007 11:18:29 NZST +1200, Ross Drummond wrote: > > --exclude /home/roger/dvd \ > > --exclude /home/roger/software \ > > --exclude "/home/roger/.mozilla/" \ > > --exclude "/home/roger/.mozilla-thunderbird/" \
The problem arises from the trailing slash on the paths, not from the leading period. tar is sensitive to that - trailing slashes are not allowed for specifying paths other than for what to pack up. > As you are using the back-slash to escape the end of line character it should > not be necessary to use the ---exclude option on each subsequent line. Wrong, sorry. tar's --exclude (and rsync's too) only takes a single argument. Repeated --exclude are allowed however. > shopt -s dotglob > > The dotglob suggestion is of the "try it and see if it works" variety rather > than authoritative advice. You can *not* use shell globs with command arguments that only accept a single argument, as the shell's expansion of the glob creates multiple words (well if more than one thing matches). You might however find that tar's --exclude handles shell glob patterns on its own. If so, you will need to quote the glob so the shell doesn't expand it. You could also use --exclude-from. Volker -- Volker Kuhlmann is list0570 with the domain in header http://volker.dnsalias.net/ Please do not CC list postings to me.
