Find: Difference between revisions

From Psygen Wiki
Jump to navigation Jump to search
Created page with " == References == <ol> <li>[http://man.he.net/?topic=find&section=all find man page]</li> </ol>"
 
No edit summary
Line 1: Line 1:
Find is used to search the directory system for files.
find ''location'' ''options'' ''search pattern''
<code>find /home myfile.txt</code> This will look in the /home folder for myfile.txt (if you leave out the location, find will look in the directory you are currently in.)
By default, find is case-sensitive. The above example will not find MYFILE.TXT. If you want the search to be case insensitive:
<code>find -iname myfile.txt</code>
The above will find all of the following:
myfile.txt
MYFILE.TXT
MyFile.txt
(etc...)





Revision as of 17:47, 23 December 2016

Find is used to search the directory system for files.

find location options search pattern

find /home myfile.txt This will look in the /home folder for myfile.txt (if you leave out the location, find will look in the directory you are currently in.)


By default, find is case-sensitive. The above example will not find MYFILE.TXT. If you want the search to be case insensitive:

find -iname myfile.txt

The above will find all of the following: myfile.txt MYFILE.TXT MyFile.txt (etc...)



References

  1. find man page