general_find
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
general_find [2022/09/24 01:27] – gman | general_find [2024/01/19 00:06] (current) – gman | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Find Stuff in Linux ====== | ====== Find Stuff in Linux ====== | ||
- | There are three basic commands to find stuff in Linux: | + | There are four basic commands to find stuff in Linux: |
- whereis | - whereis | ||
- which | - which | ||
Line 7: | Line 7: | ||
- find | - find | ||
- | ====== whereis | + | ===== whereis ===== |
Searches for binary files, source files, and man pages for the specified command names. Switches: | Searches for binary files, source files, and man pages for the specified command names. Switches: | ||
Line 25: | Line 25: | ||
---- | ---- | ||
- | ====== which ====== | + | ===== which ===== |
Returns the path to the executable indicated. | Returns the path to the executable indicated. | ||
Line 35: | Line 35: | ||
---- | ---- | ||
- | ====== locate | + | ===== locate ===== |
Fast way to search for files by name on your disk. | Fast way to search for files by name on your disk. | ||
Line 49: | Line 49: | ||
---- | ---- | ||
- | ====== find ====== | + | ===== find ===== |
- | ===== Basic Syntax | + | ==== Basic Syntax ==== |
< | < | ||
Line 96: | Line 96: | ||
---- | ---- | ||
- | |||
==== Expressions ==== | ==== Expressions ==== | ||
Line 120: | Line 119: | ||
^ Type ^ Description | ^ Type ^ Description | ||
- | | | + | | |
- | | c | character (buffered) special | + | |
| d | directory | | | d | directory | | ||
+ | | l | symbolic link | | ||
+ | | c | character device | | ||
+ | | b | block device | | ||
| p | named pipe (FIFO) | | | p | named pipe (FIFO) | | ||
- | | f | regular file | | ||
| s | socket | | | s | socket | | ||
Line 195: | Line 195: | ||
find . -type f -perm -220 | find . -type f -perm -220 | ||
# find files writeable by BOTH owner AND group (but no one else) | # find files writeable by BOTH owner AND group (but no one else) | ||
+ | |||
+ | find / -perm /4000 -type f -exec ls -ld {} \; 2>/ | ||
+ | # This will find files with the SUID bit set. | ||
+ | # -l long listing format | ||
+ | # -d list directory names, not contents | ||
</ | </ | ||
Line 238: | Line 243: | ||
</ | </ | ||
+ | ---- | ||
general_find.1663982867.txt.gz · Last modified: by gman