correct location.md

This commit is contained in:
Malin Freeborn 2020-01-02 19:20:55 +01:00
parent 78d78261e1
commit ba0d3ed483

View File

@ -1,10 +1,12 @@
# Quick Search for Files # Quick Search for Files
`locate file*` You'll need to set up `locate` for this by installing `mlocate`. `mlocate` needs a list of all files on the machine, so run:
Locate is fast because it only accesses a database of files which it regularly updates. You can update this with: > sudo updatedb
`sudo updatedb` Then to find a file called 'my-cats.jpg', run:
> locate cats
# Whereis # Whereis
@ -12,9 +14,15 @@ Locate is fast because it only accesses a database of files which it regularly u
... shows where the angband program is, along with configuration files, and binaries. ... shows where the angband program is, along with configuration files, and binaries.
Also `which` shows where a binary file is, and `type` shows aliases. Also `which` shows where a binary file (the program) is,
`which cmus` > which cmus
`type cmus` That's a lot of files for `cmus`, but you can find out exactly *which* is the program with:
> which cmus
`type` shows aliases:
> type cmus