Tar Exclude?

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Austin Godber
日付:  
題目: 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