I need to find all the .psd
files on my Linux system (dedicated web hosting). I tried something like this: ls -R *.psd
, but that's not working. Suggestions?
Asked
Active
Viewed 5.0k times
23

codeforester
- 39,467
- 16
- 112
- 140

StackOverflowNewbie
- 39,403
- 111
- 277
- 441
2 Answers
50
You can use the following find command to do that:
find /path/to/search -iname '*.psd'
iname
does a case insensitive search.

onteria_
- 68,181
- 7
- 71
- 64
-
I don't know the exact path. How do I do this recursively? – StackOverflowNewbie May 12 '11 at 23:40
-
4@StackOverflowNewbie It already does it recursively. `/path/to/search` is where you want it to start searching from. If it's the current directory use `find . -iname '*.psd'` – onteria_ May 12 '11 at 23:42
-
Or `find / -iname '*.psd'` to search the whole system. – Mahn Jun 09 '17 at 17:38
6
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)

clt60
- 62,119
- 17
- 107
- 194