From ba0d3ed483f5d719262777d4b3514273c00e5564 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Thu, 2 Jan 2020 19:20:55 +0100 Subject: [PATCH] correct location.md --- fundamentals/locating.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/fundamentals/locating.md b/fundamentals/locating.md index ae3097a..01d210c 100644 --- a/fundamentals/locating.md +++ b/fundamentals/locating.md @@ -1,10 +1,12 @@ # 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 @@ -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. -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