1. Unix/Linux File content creation, modification,deletion

Published: 13 February 2024
on channel: Technology with Kiran
58
1

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 without registration, duration hours minute second in high quality. This video was added by user Technology with Kiran 13 February 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 58 once and liked it 1 people.