PWD Displays the current path
RM command
"rm -f" 强行删除,忽略不存在的文件,不提示确认。(f为force的意思)
"rm -i" 进行交互式删除,即删除时会提示确认。(i为interactive的意思)
"rm -r" 将参数中列出的全部目录和子目录进行递归删除。(r为recursive的意思)
"rm -v" 详细显示删除操作进行的步骤。(v为verbose的意思)
Locate command
Find a specific path to a file
Cat command
Reads the contents of the file and displays
Cat is often used to display the contents of a file
-N or-number: 1 starts numbering the number of rows for all outputs;
-B or--number-nonblank: Similar to-n, except that blank lines are not numbered;
-S or--squeeze-blank: When encountering two consecutive lines above the blank line, the substitution is a row of blank lines;
-A: Display non-printable characters, end of line showing "$"
Cat M1 (displays the contents of the file ml on the screen)
Cat M1 m2 (simultaneous display of files ml and m2 content)
Cat M1 m2 > file (merging Files ml and m2 into file files)
Head command
Head/var/log/messages Display the contents of the first 10 rows
Command parameters
-n< Digit;: Specifies the number of rows to display the contents of the header;
-c< character count;: Specifies the number of characters to display the contents of the header;
-V: Always displays the header information of the file name;
-Q: The header information for the file name is not displayed.
For example:
Head-n 3/var/log/messages Display the contents of the first three rows
Head-c 10/var/logmessages Display first 10 characters
Clear Erase Screen
Kali Linux Commands