2020-01-02 00:04:35 +00:00
|
|
|
# Quick Search for Files
|
|
|
|
|
2020-01-02 18:20:55 +00:00
|
|
|
You'll need to set up `locate` for this by installing `mlocate`. `mlocate` needs a list of all files on the machine, so run:
|
2020-01-02 00:04:35 +00:00
|
|
|
|
2020-01-02 18:20:55 +00:00
|
|
|
> sudo updatedb
|
2020-01-02 00:04:35 +00:00
|
|
|
|
2020-01-02 18:20:55 +00:00
|
|
|
Then to find a file called 'my-cats.jpg', run:
|
|
|
|
|
|
|
|
> locate cats
|
2020-01-02 00:04:35 +00:00
|
|
|
|
|
|
|
# Whereis
|
|
|
|
|
|
|
|
`whereis angband`
|
|
|
|
|
|
|
|
... shows where the angband program is, along with configuration files, and binaries.
|
|
|
|
|
2020-01-02 18:20:55 +00:00
|
|
|
Also `which` shows where a binary file (the program) is,
|
|
|
|
|
|
|
|
> which cmus
|
|
|
|
|
|
|
|
That's a lot of files for `cmus`, but you can find out exactly *which* is the program with:
|
|
|
|
|
|
|
|
> which cmus
|
2020-01-02 00:04:35 +00:00
|
|
|
|
2020-01-02 18:20:55 +00:00
|
|
|
`type` shows aliases:
|
2020-01-02 00:04:35 +00:00
|
|
|
|
2020-01-02 18:20:55 +00:00
|
|
|
> type cmus
|
2020-01-02 00:04:35 +00:00
|
|
|
|