User Tools
Writing /app/www/public/data/meta/databaseandnetworkmanagement/useful_commands.meta failed
databaseandnetworkmanagement:useful_commands
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| databaseandnetworkmanagement:useful_commands [2017/05/12 12:01] – mmcc | databaseandnetworkmanagement:useful_commands [2021/06/25 10:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Useful Commands ====== | ||
| + | |||
| + | ===== File Search ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | Will search for the file and display its directory. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Tailing Logs ===== | ||
| + | |||
| + | * It is possible to tail the logs in real time using the following command: '' | ||
| + | * It is also possible to tail and grep for a keyword using the following command: '' | ||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | ===== Cat & Grep ===== | ||
| + | |||
| + | The following command is used to search all SnmpManager.log files in the current directory for the term ' | ||
| + | |||
| + | '' | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== VI ===== | ||
| + | |||
| + | Vi has 2 modes: | ||
| + | 1. Command Mode - commands which cause action to be taken on the file | ||
| + | 2. Insert Mode - where text is inserted into the file | ||
| + | ESC key turns off insert mode | ||
| + | |||
| + | **Exiting Vi** | ||
| + | :x < | ||
| + | :wq < | ||
| + | :q < | ||
| + | :q! < | ||
| + | |||
| + | **Window Motions** | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | /string Search forward | ||
| + | ?string Search backward | ||
| + | < | ||
| + | < | ||
| + | n Repeat search | ||
| + | N Repeat search reverse | ||
| + | G Go to last line | ||
| + | nG Go to line n | ||
| + | :n Go to line n | ||
| + | z<CR> Reposition window: cursor at top | ||
| + | z. Reposition window: cursor in middle | ||
| + | z- Reposition window: cursor at bottom | ||