Beginners – Finding Things

Valic —  January 17, 2013 — Leave a comment

The following commands are used to find files.  If you don’t know approximately where they are you need more powerful tools to find files such as these:

Linux Command Description


This command shows the full path of shell commands found in your path. For example, if you want to know exactly where the grep command is located on the filesystem, you can type which grep.

The output should be something like: /bin/grep


Locates the program, source code, and manual page for a command. For example, to find out where ls and its man page are type: whereis ls.

The output will look something like: ls: /bin/ls /usr/share/man/man1/ls.1.gz


A quick way to search for files anywhere on the filesystem. For example, you can find all files and directories that contain the name firefox by typing: locate firefox.

To update the locate database run the following command: updatedb.


Find is a very powerful command, but sometimes tricky to use. It can be used to search for files matching certain patterns as well as many other types of searches.
Example: find . -name \*debThis example starts searching in the current directory  and all sub-directories looking for files with deb at the end of their names.
Page 1 of 11