linux_wiki:locate_read_and_use_system_documentation_including_man_info_and_files_in_usr_share_doc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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 
-</code> 
-  * This is required for search results to be returned correctly (if it has not been done) 
-  * This command replaces the "makewhatis" command in RHEL 4/5/6. 
- 
-\\ 
-Search man page title and description only 
-<code bash> 
-man -k vim 
-</code> 
- 
-\\ 
-Search man page documentation for keyword (title, description, and pages) 
-<code bash> 
-apropos passwd 
-</code> 
- 
-\\ 
-Open specific man page section 
-<code bash> 
-man 5 passwd 
-</code> 
-  * 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 /usr/share/info/ 
-  * If no info pages, it opens up the man page 
-  * A "Node" = the page 
-  * ? => 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/previous node 
-    * 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 "tee" 
-<code bash> 
-pinfo --apropos tee 
- 
-"(coreutils)tee invocation" -- tee 
-</code> 
- 
-\\ 
-Open the tee section of coreutils 
-<code bash> 
-pinfo coreutils tee 
-</code> 
- 
----- 
- 
-===== Other locations for documentation ===== 
- 
-Documentation store for installed programs 
-  * /usr/share/doc 
- 
-Search system for keywords 
-<code bash> 
-updatedb 
-locate passwd 
-</code> 
-  * updatedb => updates the search index, usually done via cron 
- 
-\\ 
-Show location of binary 
-<code bash> 
-which passwd 
-</code> 
- 
-\\ 
-Search man page descriptions only 
-<code bash> 
-whatis passwd 
-</code> 
- 
-\\ 
-Find binary, source files, config files, and man page locations 
-<code bash> 
-whereis passwd 
-</code> 
- 
-\\ 
-Search documenation installed 
-<code bash> 
-rpm -qd packagename 
-</code> 
-  * 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 
-</code> 
- 
-\\ 
-Update cache database 
-<code bash> 
-updatedb 
-</code> 
- 
-\\ 
-Find files/folders called "syslog" 
-<code bash> 
-locate syslog 
-</code> 
- 
----- 
- 
-==== Find ==== 
- 
-Real time searching. Slower, but more flexible. 
- 
-Find files/directories with motd in the name 
-<code bash> 
-find / -name motd 
-</code> 
- 
-Find, starting in /, all files (type f) owned by rjones 
-<code bash> 
-find / -user rjones -type f 
-</code> 
- 
-Remove all files owned by rjones 
-<code bash> 
-find / -user rjones -type f -exec rm '{}' \; 
-</code> 
- 
-Find all files modified in the last 3 days 
-<code bash> 
-find / -mtime -3 -type f 
-</code> 
- 
----- 
  
  • linux_wiki/locate_read_and_use_system_documentation_including_man_info_and_files_in_usr_share_doc.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)