Differences
This shows you the differences between two versions of the page.
linux_wiki:locate_read_and_use_system_documentation_including_man_info_and_files_in_usr_share_doc [2016/03/01 21:47] billdozor [Locate] |
linux_wiki:locate_read_and_use_system_documentation_including_man_info_and_files_in_usr_share_doc [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Locate Read And Use System Documentation Including Man Info And Files In Usr Share Doc ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | Using various documentation sources. | ||
- | |||
- | ---- | ||
- | |||
- | ===== man pages ===== | ||
- | |||
- | Index man page database | ||
- | <code bash> | ||
- | mandb | ||
- | </ | ||
- | * This is required for search results to be returned correctly (if it has not been done) | ||
- | * This command replaces the " | ||
- | |||
- | \\ | ||
- | Search man page title and description only | ||
- | <code bash> | ||
- | man -k vim | ||
- | </ | ||
- | |||
- | \\ | ||
- | Search man page documentation for keyword (title, description, | ||
- | <code bash> | ||
- | apropos passwd | ||
- | </ | ||
- | |||
- | \\ | ||
- | Open specific man page section | ||
- | <code bash> | ||
- | man 5 passwd | ||
- | </ | ||
- | * Opens section 5 of the passwd man pages | ||
- | |||
- | ---- | ||
- | |||
- | ===== info utility ===== | ||
- | |||
- | * info pages => Texinfo GNU documentation | ||
- | * Organized like an FTP directory web page (links to other pages, going up/down the hierarchy, etc) | ||
- | * Searches / | ||
- | * If no info pages, it opens up the man page | ||
- | * A " | ||
- | * ? => to see command keys for info | ||
- | * Arrow Up => Up one line | ||
- | * Arrow Down => Down one line | ||
- | * Tab => Next hyperlink | ||
- | * Return => Follow hyperlink | ||
- | * l => Go back to the last/ | ||
- | * Space => One screenful forward | ||
- | * Delete => One screenful backward | ||
- | * s => Search for a pattern | ||
- | * } => Next pattern match | ||
- | * { => Previous pattern match | ||
- | * n => next node on this level | ||
- | * p => previous node on this level | ||
- | * u => up one level | ||
- | * Two commands: | ||
- | * info = original command | ||
- | * pinfo = menu items are clearly indicated (use this one) | ||
- | |||
- | Search Info Pages for " | ||
- | <code bash> | ||
- | pinfo --apropos tee | ||
- | |||
- | " | ||
- | </ | ||
- | |||
- | \\ | ||
- | Open the tee section of coreutils | ||
- | <code bash> | ||
- | pinfo coreutils tee | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Other locations for documentation ===== | ||
- | |||
- | Documentation store for installed programs | ||
- | * / | ||
- | |||
- | Search system for keywords | ||
- | <code bash> | ||
- | updatedb | ||
- | locate passwd | ||
- | </ | ||
- | * updatedb => updates the search index, usually done via cron | ||
- | |||
- | \\ | ||
- | Show location of binary | ||
- | <code bash> | ||
- | which passwd | ||
- | </ | ||
- | |||
- | \\ | ||
- | Search man page descriptions only | ||
- | <code bash> | ||
- | whatis passwd | ||
- | </ | ||
- | |||
- | \\ | ||
- | Find binary, source files, config files, and man page locations | ||
- | <code bash> | ||
- | whereis passwd | ||
- | </ | ||
- | |||
- | \\ | ||
- | Search documenation installed | ||
- | <code bash> | ||
- | rpm -qd packagename | ||
- | </ | ||
- | * Only if installed via a rpm package (either via rpm or yum) | ||
- | |||
- | ---- | ||
- | |||
- | ===== Finding Files With Locate And Find ===== | ||
- | |||
- | ==== Locate ==== | ||
- | |||
- | Search cache database for patterns, very fast, but simple pattern searching. | ||
- | |||
- | Install package | ||
- | <code bash> | ||
- | yum install mlocate | ||
- | </ | ||
- | |||
- | \\ | ||
- | Update cache database | ||
- | <code bash> | ||
- | updatedb | ||
- | </ | ||
- | |||
- | \\ | ||
- | Find files/ | ||
- | <code bash> | ||
- | locate syslog | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ==== Find ==== | ||
- | |||
- | Real time searching. Slower, but more flexible. | ||
- | |||
- | Find files/ | ||
- | <code bash> | ||
- | find / -name motd | ||
- | </ | ||
- | |||
- | Find, starting in /, all files (type f) owned by rjones | ||
- | <code bash> | ||
- | find / -user rjones -type f | ||
- | </ | ||
- | |||
- | Remove all files owned by rjones | ||
- | <code bash> | ||
- | find / -user rjones -type f -exec rm ' | ||
- | </ | ||
- | |||
- | Find all files modified in the last 3 days | ||
- | <code bash> | ||
- | find / -mtime -3 -type f | ||
- | </ | ||
- | |||
- | ---- | ||