notes_Linux
1261NOTESLinux2021-11-17
as root user: sudo su
File access
cat <file name>
readcat > <file name>
overthrowvi <file name>
open vi editormv <old name> <new name>
rename a filerm
removecp -v <from path> <to path>
find <path> -name <name | regular expression >
search by file name or regular expression:w
save:wq
or zz
save and exit:q!
exit without savingi
insertd
or <number>dd
delete linesb
to the beginning of the worde
to the end of the word:u
or :<number>u
undo:set nu
show line number:<line number>
to the given line<number>yy
yank multiple lines from the cursor position