LoginSignup
1
1

More than 5 years have passed since last update.

再帰的にバイナリを strip する

Posted at

指定したディレクトリの中のバイナリファイルをすべて strip する。

find /path/to/dir -type f -print0 | sudo xargs -0 sh -c '
  for f in "$@"; do
    if file -bi "$f" | grep -E "^application/(x-executable|x-sharedlib|x-archive)" >/dev/null; then
      echo "$f"
      strip -p "$f"
    fi
  done
' --
1
1
0

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
1
1