I am searching for files in linux and am able to execute the command to search for a single type of format e.g *.jpg but would like to find all files with *.jpg and *.css in one command.
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
|
||||
migrated from stackoverflow.com Apr 23 '12 at 22:34
|
|||||||
|
|
|
There is a fingerbreaking variant with regex:
It's shorter and avoid pitfalls, combined with the -o versions:
The ls is only adapted to the second pattern, here. You can avoid it with
but that is getting a bit cryptic too. Very fast for searching your whole system in the update-db-index is locate, which knows regex too, but doesn't find ultra fresh files:
|
|||
|
|
man YOURCOMMAND(in this casefind) first. – Zsolt Botykai Apr 23 '12 at 8:25