786
Logging On Remotely via the Command Line
$ ssh -l oracle rmoug1
$ ssh -p 71 -l oracle rmoug1
$ telnet -l oracle dbsrver
Logging Off the Server
Pressing Ctrl+D
Typing exit
Typing logout
/etc/bashrc change the parameter TMOUT
Running a Command
df (disk free)
options, flags and switches
ls -a
also arguments
df -h /dev/sda2
The man pages are usually divided into ten sections. The man command will display the first
man page match it finds for a specified command. The following list shows the section number
and type of commands documented in each section:
1. User commands
2. System calls
3. Subroutines (library functions)
4. Devices
5. File formats
6. Games
7. Miscellaneous
8. System administration
9. Local
10. New
Sometimes a Linux utility will be documented in more than one man section. To view all man
documentation available for a tool, use the -f option (this is equivalent to running the whatis
command).
$ man -f cd
Sometimes DBAs are confused when they type man cd and are presented with the Bash
shell’s built-in documentation. To view the man documentation specific to the cd utility, then
specify the 1p page:
$ man 1p cd
To scroll through all man sections associated with a command, use the -a option. When in
this mode, press the Q key to advance to the next man section of information.
CAPTURING MAN PAGES IN A TEXT FILE
$ man find >find.txt
$ man find | col -b >find.txt (to avoid unreadable characters)
whatis pwd
The number (enclosed by parentheses) specifies the section of the man page where you can
find the command. When you see multiple lines listed by whatis, this indicates the command
is documented in more than one location in the man pages.
Another interesting use of the whatis command is to view a one-line description of
commands in the /bin directory. This example uses whatis with ls, xargs, and less to view,
one page at a time, the descriptions of all commands in the /bin directory:
$ cd /bin
$ ls | xargs whatis | less
Locating a Command
Use which or whereis to locate the executable binary file of a command.
$ which man
/usr/bin/man
while using man command options:
Keystroke Action
J, E, or down arrow Move down one line.
K, Y, or up arrow Move up one line.
Up arrow Move up one line.
Down arrow Move down one line.
/<string> Search for <string>.
N Repeat the previous search forward.
Shift+N Repeat the previous search backward.
H Display help page.
F, spacebar, or Page Down Move down one page.
B or Page Up Move up one page.
Q Exit man page.
$ man -f cd
$ man 1p cd
$ man -a cd
$ whatis pwd
whatis command is to view a one-line description of commands in the /bin directory:
$ cd /bin
$ ls | xargs whatis | less
The previous line of code will first list the files in the /bin directory; then, the output of that
is piped to the xargs command. The xargs command will take the output of ls and send it to
the whatis utility. The less command will display the output one page at a time. To exit from
the documentation (displayed by less), press the Q key (to quit).
The whatis command is identical to the man -f command
Locating a Command
Use which or whereis to locate the executable binary file of a command
[oracle@prod ~]$ which man
/usr/bin/man