2022-01-16 18:20:39 +00:00
|
|
|
---
|
|
|
|
title: "locating"
|
2025-02-11 19:47:50 +00:00
|
|
|
tags: [ "Basics" ]
|
2022-01-16 18:20:39 +00:00
|
|
|
---
|
2022-01-26 21:29:48 +00:00
|
|
|
# Type
|
|
|
|
|
|
|
|
`type` shows what kind of thing you're running, be it an alias, function, or binary program.
|
|
|
|
|
2025-02-12 14:36:40 +00:00
|
|
|
```sh
|
|
|
|
type cd
|
|
|
|
type ls
|
|
|
|
type -P ls
|
|
|
|
type -a cat
|
2023-06-17 19:28:20 +00:00
|
|
|
```
|
2022-01-26 21:29:48 +00:00
|
|
|
|
2020-01-05 12:33:53 +00:00
|
|
|
# Whereis the Program
|
2020-01-02 00:04:35 +00:00
|
|
|
|
2025-02-12 14:36:40 +00:00
|
|
|
Where is `grep` and all its configuration files?
|
2020-01-02 00:04:35 +00:00
|
|
|
|
2025-02-12 14:36:40 +00:00
|
|
|
```sh
|
|
|
|
whereis grep
|
2023-06-17 19:28:20 +00:00
|
|
|
```
|
2020-01-02 18:20:55 +00:00
|
|
|
|
2025-02-12 14:36:40 +00:00
|
|
|
Which one of these is the binary file which you actually use?
|
2025-01-14 04:05:36 +00:00
|
|
|
|
2025-02-12 14:36:40 +00:00
|
|
|
```sh
|
|
|
|
which grep
|
2023-06-17 19:28:20 +00:00
|
|
|
```
|
2020-01-05 12:33:53 +00:00
|
|
|
|
2025-02-12 14:36:40 +00:00
|
|
|
# More
|
2025-01-14 04:05:36 +00:00
|
|
|
|
2025-02-12 14:36:40 +00:00
|
|
|
- [Search instantly with `plocate`](data/search_system.md)
|
2020-01-02 00:04:35 +00:00
|
|
|
|