I am in a directory which contains more directories. What command can I use to get all files ending with .rb
?
Files with a ~ at the end of their names (for example, example. txt~) are automatically created backup copies of documents edited in the gedit text editor or other applications. It is safe to delete them, but there is no harm to leave them on your computer. These files are hidden by default.
Find files modified in last X days Here dot (.) is used to search in current directory. And -30 defines to search files modified in last 30 day. Change this number with your search requirements. You can also customize search based on file type.
txt files in the directory: ls *. txt. List by file size: ls -s. Sort by time and date: ls -d.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With