search for specific file extension
Well, i ashamed to ask such question. but i did look at tutorial and wiki, but i'm unable to list all mp3 file i have on a folder and his sub-folder.
i tried Code:
ls -R *.mp3 Code:
ls: cannot access *.mp3: No such file or directory Code:
ls -R * What did i do wrong ? Thanks in advance |
1. -R will not help you
2. Does the case-ing differ? i.e. perhaps the files are .MP3 rather than .mp3 [or .mP3 or .Mp3] |
I guess the files are not in the current directory, since you're using -R. You can do either
Code:
ls -R | grep .mp3$ Code:
find . -name \*.mp3 |
Code:
ls -laR | awk 'BEGIN{ |
@noctilucent
-1- Yes i need the -R option since i'm looking for these file in all sub-folder -2- I checked already, all are lower case Thanks @noctilucent Your solutions (both) are exactly what i was looking for. Thanks for your kind and fast help. @ghostdog74 I'm not(yet) an expert on shell(is it ?) so i would not comment you code. Thanks anyway. |
All times are GMT -5. The time now is 03:56 PM. |