Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
find . -iname '*.rar' -execdir unar {} \; -exec rm {} \;
unar が成功のリターン コードを返した場合にのみアーカイブを削除するために、上記のコマンドを変更するにはどうすればよいですか?
その必要はありません。-execdirすでに通常の述語のように機能し、実行されたコマンドの結果に応じて成功または失敗します。
-execdir