Use the following commands in your terminal
- find / -iname filename or partial filename
- find / -iname *.conf
- This will find every instance conf no matter where it is.
- The / after find tells find to look in every directory below and including the root of the filesystem.
- The - in front of name tells Linux to not worry about caps.
You can use wildcards such as find / -iname wiki* to find, for example, "wikiHow.dat".
- There are many variables you can use with find.
Type "man find" or "info find" at a terminal prompt for more information then you care to know. Skip the " " when entering the commands.
Tips
- If the list of files is extensive, you can pipe the command to "less" so you can scroll back for forth.
- find / -iname *.conf | less
- If you want to send the search results into a file to be read later
- find / -iname *.conf > ~/myfile
The tilde ~ represents your home directory so if your user name is Joe you can find the filemyfile in /home/joe.
- The locate command will often find files much faster, but it's not always up to date.
- locate important-paper
- locate conf
No comments:
Post a Comment