lk/basics/locating.md

29 lines
584 B
Markdown
Raw Normal View History

2022-01-16 18:20:39 +00:00
---
title: "locating"
tags: [ "Documentation", "basics" ]
---
2020-01-05 12:33:53 +00:00
# Whereis the Program
2020-01-02 00:04:35 +00:00
2020-01-05 12:33:53 +00:00
Ask where the `angband` program is, along with all its configuration files:
2020-01-02 00:04:35 +00:00
`whereis angband`
2020-01-02 18:20:55 +00:00
Also `which` shows where a binary file (the program) is,
> which cmus
2020-01-05 12:33:53 +00:00
`type` shows what kind of thing you're running, be it an alias, or binary program.
2020-01-02 18:20:55 +00:00
2020-01-05 12:33:53 +00:00
> type cmus
2020-01-02 00:04:35 +00:00
2020-01-05 12:33:53 +00:00
# Quick Search for Files
2020-01-02 00:04:35 +00:00
2020-01-05 12:33:53 +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:
> sudo updatedb
Then to find a file called 'my-cats.jpg', run:
> locate cats
2020-01-02 00:04:35 +00:00