开发者

How to recursively search for files with certain extensions?

开发者 https://www.devze.com 2023-03-05 19:10 出处:网络
I need to find all the .psd files on my Linux system (dedicated web hosting). I tried something like this: ls -R *.psd, but th开发者_StackOverflowat\'s not working. Suggestions?You can use the followi

I need to find all the .psd files on my Linux system (dedicated web hosting). I tried something like this: ls -R *.psd, but th开发者_StackOverflowat's not working. Suggestions?


You can use the following find command to do that:

find /path/to/search -iname '*.psd'

iname does a case insensitive search.


you also can

ls ./**/*.psd

but:

  • you must have bash version 4+
  • you must have shopt -s globstar #in your .bashrc or .profile, etc....
  • will search case sensitive (or you must set shopt -s nocaseglob too)
0

精彩评论

暂无评论...
验证码 换一张
取 消