Tar Exclude?

Página superior
Adjuntos:
Obtener este mensaje como un correo
+ (text/plain)
Eliminar este mensaje
Responder a este mensaje
Autor: Lynn David Newton
Fecha:  
Asunto: 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