Tar Exclude?

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: Austin Godber
Dato:  
Emne: 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