LoginSignup
7
8

More than 5 years have passed since last update.

find で探したファイルを tar に

Last updated at Posted at 2013-11-26

たとえばサイズが 10MB 以上のファイルを find で探して tar に渡して圧縮する。

find . -type f -size +10M -print0 | xargs -0 tar czf foo.tar.gz

xargs を使うと、引数が一定数以上の場合はプロセスが分割され、tar を上書きしてしまうとのこと。
@nacht_666コメントを参照してください。
ご指摘ありがとうございました。

7
8
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8