Cty's Linux study notes (4)

Linux Study Notes - Part 4

(Disclaimer: This note is only for study records and reference)

cp:

    -r: copy a directory

    -i: security options

echo: used for printing, if there is a '>' symbol after the test, write the content before '>' to the following file, if it is '>>', it means appending

touch: If the file exists, it will change the access time of the file, if there is no such file, it will be created

cat: used to read the file and print the read content to the current screen

mv: move files or directories, also play the role of renaming

cat:

    -n: When viewing the file, also display the line number on the screen

    -A: show all content, including special content

tac: the same as the command cat, but written in reverse order, but without the -n and -A options

less: the same as more, press the space bar to turn the page, press the j key to go down a line, press the k key to go up a line, when viewing a file, press the '/' key, enter a string, you can find the string If you find more than one, press n to display the next one, you can also use '? ' replaces '/', but '? ' is to want to search

head: used to display the first 10 lines of the file, followed directly by the file name, if -n is followed, the first n lines of the file will be displayed

tail: used for the last 10 lines of the mind file

    -n: last n lines

    -f: dynamically view the last 10 lines

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325586878&siteId=291194637