Академический Документы
Профессиональный Документы
Культура Документы
Vi Editor:
It is a screen oriented text editor originally created for UNIX operating system.
Modes of Operation
While working with the vi editor, we usually come across the following three modes
Insert mode − this mode enables you to insert text into the file. Everything
that's typed in this mode is interpreted as input and placed in the file.
vi always starts in the command mode. To enter text, you must be in the insert mode
for which simply type i. To come out of the insert mode, press the Esc key, which
will take you back to the command mode.
Basic Vi Commands:
Sl.no Command Description
4 : q! To force quit
UNIX Commands
Commands Syntax Description
Vi Vi filename.c Used to create a file
cc Cc filename.c Compile the file name and create executable
file a.out. This is executed using ./a.out
command.
cp cp file1 file2 Copy file into directory
rm rm filename Remove or delete file
mv mv file1 file2 Move or rename files
man man Online manual (help) about command
commandname
mkdir mkdir Make a directory
directoryname
cd cd directoryname Change to directory
cd .. Move back to old directory
rmdir rmdir To remove a directory
directoryname
ls Lists files in current directory
Exit To exit the shell