| |
 |
|
Viewing and editing files in UNIX - vi editor, tail command Oracle Tips by Burleson Consulting
|
Viewing and editing files in
UNIX
UNIX provides several commands and utility programs for viewing the
contents of data files. These tools are often very foreign and
cryptic to the UNIX beginner, but it is critical to the effective
management of Oracle that you become comfortable with these powerful
tools:
-
The vi editor – pronounced “vee-eye” –
This is a powerful text-processing program, which, once
mastered, is far faster than any text editor known to personal
computers. Inside the vi editor, every key (both uppercase and
lowercase) performs an editing function. For vi for read-only
access, files can be accessed using the view command.
-
The cat command - The cat (concatenate)
command, (like the MS-DOS type command), displays the contents
of a file on the screen. For example, entering the command cat
food would display the entire food file on your screen.
-
The more command – The more command is
used to display a file, one screen at a time. For example,
entering the command more food would list the food file, and you
press the spacebar for the next screen of text.
-
The head command – The head command is
used to display the first lines of a file. For example, entering
the command head start would display the first three lines of
the start file.
-
The tail command – The tail command is
used to display the last lines in a file. For example, entering
the command tail gating would display the last three lines of
the gating file.
|