|
L i n u x H e l p
: :
: :
: :
: :
|
VI Editor quick reference
The vi editor is often looked at as archaic and difficult to learn, but it is in fact, rather simple if you know the main commands to use. This tutorial will teach you nearly everything you will ever need to know about the vi editor.
vi editor usage: vi filename
If the file does not exist, it will be created for you.
There are three modes of vi that you need to understand.
command mode - used to give commands to the editor
input mode - used to input text
ex mode - denoted by typing a : from command mode.
When you execute vi, you start in command mode and must tell vi what you want to do before inputting text.
Quick Reference for vi editor commands. Any command the ends in <esc>is a command that will put you into a specific mode until <esc> is pressed to back you out to command mode. If at any time you forget what mode you are in, or you get lost by typing the wrong character, you can press <esc> twice to ensure that you are in command mode.
i - insert before cursor <esc>
I - insert at beginning of line <esc>
a - append (add) text after cursor <esc>
A - append text at end of line <esc>
x - delete one character at the current cursor position
r - replace a single character at the cursor
R - replace characters until <esc> is pressed
#d - delete # of lines
dd - delete current line
D - delete remainder of line after cursor
Quick Reference for ex mode commands
:w - write the current buffer to the file
:w filename - write the buffer to filename
:w! - write to a read-only file
:wq - write and quit the editor
:q - quit the editor
:q! - force quit if :q doesn't work (modified, but don't want to save changes)
:%s/string/newstring/g - replace 'string' with 'newstring' globally
A more in-depth tutorial can be found at http://www.eng.hawaii.edu/Tutor/vi.html.
I certainly hope this helps! If you see anything that is in error or needs to be added, please let me know ;-)
To learn more about the VI Editor, check out these books at Amazon.com.
|
|
|
|
|
L i n u x W o r l d N e w s
: :
: :
: :
: :
|
|
|
What in the hell is a KrnlPanic? Well, a KrnlPanic is me! Actually, let's start with "What is a kernel?". The
kernel is the core of your operating system (OS), whether your OS is Linux, Unix or windows. The kernel takes
care of all process management (what program runs and when), memory management (which parts of memory get used for what) and
also, the kernel takes care of interfacing the OS with your computer's hardware (disk drives, sound card, modem, network card, etc).
Now...since the kernel is doing all of these extremely important jobs, it stands to reason
that if it has an error, it will be a Bad Thing(tm).
If you use windows, you know a kernel panic as a "BSOD" or Blue Screen of Death. Or how about "Invalid Page
Fault in KERNEL32.DLL". I'm sure you've probably seen both of those. In Linux, a Kernel Panic is normally plainly stated
so. At boot time is when you will see most linux panics. I have yet to see a linux kernel panic while the system is running.
You may have seen "Kernel Panic: init not found" or "Kernel Panic: VFS unable to mount root fs on 2:00". All of these previously
listed errors are because of something that happened to the kernel that it couldn't handle, whether it was an access to an
invalid memory location or the inability to find the initialization files it requires.
I hope that sufficiently explains things. Oh yeah...KrnlPanic is also my name ;-)
- Rick
|
|
|
|
|
|
S l a s h d o t / F r e s h m e a t
: :
: :
: :
: :
|
Slashdot and Freshmeat Headlines at 1219201157
(Unixtime)
|
|
|
|