How to find all files ending with .rb with Linux?
I am in a directory which contains more directories.
What command can I use to get all开发者_Python百科 files ending with .rb
?
You could try
find . -type f -name \*.rb
Try this find . -type f -name '*.rb'
.
For a more thorough explanation, get the 'Unix Power Tools' book.
This should help:
find . | grep *\.rb
This should do it
find . -name "*t^" -print
You can find all the files ending with .rb by following command
find . -type f -name '*.rb'
To store the results after finding, you can use the following command
filesEndingWithRb=$(find . -type f -name '*.rb')
To print the results
echo $filesEndingWithRb
精彩评论