Tar Exclude?

Página superior
Adjuntos:
Obtener este mensaje como un correo
+ (text/plain)
Eliminar este mensaje
Responder a este mensaje
Autor: Austin Godber
Fecha:  
Asunto: Tar Exclude?
Jay wrote:
> tar cv --exclude=/var/tmp/directory-to-exclude -f var.tar /var
> tar cv --exclude=/var/tmp/directory-to-exclude/* -f var.tar /var


In your second example, the path is attached to the --exclude so it doesn't get
treated like a real path by the shell ... I think this results in your * being
expanded to the contents of the current directory or something like that.

Try putting single quotes around the *.

tar cv --exclude=/var/tmp/directory-to-exclude/'*' -f var.tar /var


Austin