0
我在bash腳本中運行了以下代碼。bsdtar的-q選項
# See if bsdtar can recognize the file
if bsdtar -tf "$file" -q '*' &>/dev/null; then
cmd="bsdtar"
else
continue
'-q'選項的含義是什麼?我在bsdtar命令的幫助信息中找不到任何信息。
謝謝!
我在bash腳本中運行了以下代碼。bsdtar的-q選項
# See if bsdtar can recognize the file
if bsdtar -tf "$file" -q '*' &>/dev/null; then
cmd="bsdtar"
else
continue
'-q'選項的含義是什麼?我在bsdtar命令的幫助信息中找不到任何信息。
謝謝!
從的bsdtar man page:
-q (--fast-read) (x and t mode only) Extract or list only the first archive entry that matches each pattern or filename operand. Exit as soon as each specified pattern or filename has been matched. By default, the archive is always read to the very end, since there can be multiple entries with the same name and, by convention, later entries overwrite earlier entries. This option is provided as a performance optimization.