Tar Exclude?

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: Austin Godber
Dátum:  
Tárgy: 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