Session-1
a)Log into the system
Sol : Login
b)Use vi editor to create a file called myfile.txt which contains some text.
Sol : Vi mytable
c)correct typing errors during creation.
Sol: Practice vi editor commands
d)Save the file
Sol: :wq + Enter
e)logout of the system
Sol: logout
To Start vi
To use vi on a file, type in vi filename. If the file named filename exists, then
the first page (or screen) of the file will be displayed; if the file does not exist,
then an empty file and screen are created into which you may enter text.
To Exit vi
Usually the new or modified file is saved when you leave vi. However, it is also
possible to quit vi without saving the file.
Deleting Text
The following commands allow you to delete text.
x delete single character under cursor
Nx delete N characters, starting with character under cursor
dw delete the single word beginning with character under cursor
dNw delete N words beginning with character under cursor;
e.g., d5w deletes 5 words
D delete the remainder of the line, starting with current cursor position
dd delete entire current line
Ndd or dNd delete N lines, beginning with the current line;
e.g., 5dd deletes 5 lines
Watch video 1. Unix/Linux File content creation, modification,deletion online, duration hours minute second in high quality that is uploaded to the channel Technology with Kiran 13 February 2024. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 58 times and liked it 1 visitors.