Whatever you do will be insignificant, but it is very important that you do it.
- Mahatma Gandhi

Thursday, August 28, 2008

Finding multiple files with the find command on Linux

After fighting with the find command for quite a while yesterday, and trying to figure out it's regular expression parsing engine, one of my co-workers just let me in on a very useful function of find. You can specify multiple "-name" options on a command line if you seperate them with a "-o". For example, if you want to find all the files on your system named kids.txt and money.txt, you could issue the following command,
find / -name kids.txt -o -name money.txt
Pretty handy. Hope this helps you out if you are ever in this situation!

No comments: