vi Command for Edit File CentOS via Putty

Perintah vi Command untuk mengedit file di CentOS

Login dengan Putty, cari file dengan perintah:

vi /folder/file*

lalu edit, dengan perintah, pilih di bawah ini:

This is especially critical when editing system and configuration files.

CommandPurpose
$ vi <filename>Open or edit a file.
iSwitch to Insert mode.
EscSwitch to Command mode.
:wSave and continue editing.
: wq or ZZSave and quit/exit vi.
:q!Quit vi and do not save changes.
yyYank (copy a line of text).
pPaste a line of yanked text below the current line.
oOpen a new line under the current line.
OOpen a new line above the current line.
AAppend to the end of the line.
aAppend after the cursor’s current position.
IInsert text at the beginning of the current line.
bGo to the beginning of the word.
eGo to the end of the word.
xDelete a single character.
ddDelete an entire line.
XddDelete X number of lines.
XyyYank X number of lines.
GGo to the last line in a file.
XGGo to line X in a file.
ggGo to the first line in a file.
:numDisplay the current line’s line number.
hMove left one character.
jMove down one line.
kMove up one line.
lMove right one character.


Sebagai Dokumentasi.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s