LoginSignup
66
66

More than 5 years have passed since last update.

findで特定のディレクトリを除外

Last updated at Posted at 2015-08-20

特定のディレクトリ(lib)を除外したファイルの一覧を取得

例1
$ find . -type d -name lib -prune -o -type f -print

特定のディレクトリ(lib)を除外して、ファイル名が"*.php"のものの一覧を取得

例2
$ find . -type d -name lib -prune -o -type f -name '*.php' -print

参考: findコマンドで特定のディレクトリ以下を無視する方法 - mollifier delta blog

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