Alternative way to find files with specific extension in a folder on Linux

If you don’t like the “find” command, you can use the following one instead (I prefer it myself):

ls -R | grep “\.xml”

where “-R” lists all recursively
grep is used to filter filename
“\.xml” you must put the “\” before any special character to return the proper result, you can of course use any other regular expression”

Unknown's avatar

About Ahmed Tawfik

Cybersecurity Professional, Systems Engineer, OSS & Linux Geek
This entry was posted in Linux and tagged , , , , . Bookmark the permalink.

Leave a comment