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”

About SoCRaT

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

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s