Editing with vi and
vim
When administering the system and databases, configuration files
often need to be edited, logs searched through and shell scripts
written. For a long time, the vi edit has been one of the most
popular editors for manipulating text files on UNIX and UNIX-like
systems because of its consistency and ubiquity.
In most modern Linux distros, vi
has been replaced by vim, an
improved text editor based on vi (the name vim is an acronym for Vi
IMproved.) An alias for vi is set up by default in both RedHat and
OE Linux, so for those used to using vi, the command will still
work. For most purposes where this may be a concern, vim is
identical to the vi editor found on many UNIX systems, but it does
offer several advantages, particularly for programmers. Where vi is
mentioned in this book, consider it synonymous with vim, especially
since the vi command that is included with Linux is often just
another copy of vim.
vi is a very powerful text editor, but it will seem cumbersome at
first if you are not used to it. While it is unlikely you will
start using it for all your text-editing needs, it is invaluable to
be able to make quick changes on the system without having to
transfer files to your workstation and back to the server.
Invoking vi
The vi command is typically started with a file name as an
argument. An existing file name or the name of a file that needs to
be created can be provided.
$ vi chapter1.txt
Having a little background on Linux helps us understand why
things are the way they are.
Originally written in 1991, Linux is a relatively young operating
system compared to its UNIX counterparts that have their origins in
the late 1960s.
The Linux kernel (the core of any Linux operating system) was
conceived, created, and of course named after Linus Torvalds.
Linus' intent was to create a free operating system for himself
and other hobbyists.
Soon after Linus announced his project several other software
developers who were interested in the project started to contribute
code to the Linux kernel and additionally to port software to
(compile it to work with) the Linux kernel.
Interest in the project skyrocketed and many formal releases of
Linux followed.
@
@
"chapter1.txt" 13L, 1027C 9,1 Top
In the example above, two @ symbols can be seen near the bottom
of the screen. This indicates that there are more lines present
that will not fit completely on the current screen. If a short file
is being edited, tilde (~) will be seen, indicating lines past the
end of the file that is being edited.
|
|
|
Get the Complete Details on
Linux System Management for Oracle DBAs
The landmark book
"Linux for the Oracle DBA: The
Definitive Reference"
provides comprehensive yet specific
knowledge on administering Oracle on Linux. A
must-have reference for every DBA running or planning to run
Oracle on a Linux platform.
Buy it
for 30% off directly from the publisher.
|
|
|
|
Burleson is the American Team
Note:
This Oracle
documentation was created as a support and Oracle training reference for use by our
DBA performance tuning consulting professionals.
Feel free to ask questions on our
Oracle forum.
Verify
experience!
Anyone
considering using the services of an Oracle support expert should
independently investigate their credentials and experience, and not rely on
advertisements and self-proclaimed expertise. All legitimate Oracle experts
publish
their Oracle
qualifications.
Errata?
Oracle technology is changing and we
strive to update our BC Oracle support information. If you find an error
or have a suggestion for improving our content, we would appreciate your
feedback. Just
e-mail:
and include the URL for the page.
Copyright © 1996 - 2020
All rights reserved by
Burleson
Oracle ®
is the registered trademark of Oracle Corporation.
|
|