Tar Exclude?

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: Lynn David Newton
Dato:  
Emne: Tar Exclude?
> tar cv --exclude=/var/tmp/directory-to-exclude/* -f var.tar /var

As someone else correctly noted, the problem is that an
unquoted asterisk will be interpreted as a
metacharacter by the shell before passing it to tar.
The suggestion was made to put just the * in single
quotes. I think that works, but strikes me as a weird
way to do it. I would quote the whole argument in
double quotes, from after the = sign through and
including the asterisk.

--
Lynn David Newton
Phoenix, AZ