notes_Linux
1201NOTESLinux2021-11-17
as root user: sudo su
File access
cat <file name>
readcat > <file name>
overthrow
find <path> -name <name | regular expression >
search by file name or regular expressionfind <path> -name "*.txt" -delete
delete all files matching regular expression
vi
vi <file name>
open edit mode:w
save:wq
or zz
save and exit:q!
exit without savingi
insertd
or <number>dd
deletel 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