[Shell] 找出指定目錄下所有特定檔名並壓縮

find /usr/foo -type f -name "*.pdf" -exec tar -czvf /tmp/bar.gz {} +

You can use {} + instead of {} \; so it will group the results of find into one argument

Leave a Comment

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *