Tar Exclude?

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