vi
vi file name//Open file
How to close the file · After pressing esc: close the editor with q.
Save file -After pressing esc: Save with w.
Save the file and exit. -After pressing esc: Save with wq and exit.
-Write to a file Press i to enter insert mode. To write at the end of the line, press a to enter insert mode.
・ Move by specifying a line Specify as: line. If it is set to 1, it moves to the first line.
・ Copy Copy with yy Paste with p You can specify multiple lines with the number of lines you want to copy.
・ Return to the beginning Go back to the beginning with gg
・ Search for character strings / Search for the specified string in the string.
-Replacement of character strings : Target line s / search string / replacement string / option
Recommended Posts