nl
Show file line number
nl myscript
Printf
formatting text
%[-+]m.nx
-The starting position from the beginning of the line
m represents the width of the field and N indicates the maximum width of the field
S: String.
C: Character.
D: number.
X:1 6 binary number.
O:1 0 binary number.
SZX1000366880:~ # printf "0x%x\n" 12000x4b0
Script
Record the operation process
scrpit mycmd.log
Strings
To view text in a binary file
strings file
Uname
Displays information about the current operating system
Wait ProcessID
Wait for process to end
Wc
Count characters, number of lines, number of words
wc -cwc -lwc -w
Whereis
Displays the path of the binaries and their online manuals
Whoami/who
Current login Name
BaseName
Detach a file name from a path
DirName
Detach a part of the file name from the path
Cat file1 file2 > File3
Merge 2 files
Diff
Comparison of two files
dircmp
Comparison of two folders
File filename
Determine file type
Fuser-u/DEV/SDB1
Show all processes that access the device
···
Fuser-k file kills all processes that access files
···
Common shell commands