8. Common system command "Mr.Robot"
These commonly used basic commands must remember "Mr.Robot".
View the file:
# ls-lhtr
To make the configuration effective:
# source / etc/profile
#. / etc/profile
Create a directory:
# mkdir-p
Copy:
# cp-r
Soft links:
# ln-sv
Hard link: the inode that points to this file cannot break the system, partition, or link directory.
Tar decompression package gz
# tar xf
Create a user:
# groupadd-r mysql
# useradd-g mysql-r-s / sbin/nologin mysql
Useradd
-g: specify a user group.
-r: set up a system account.
-s: specifies the shell to be used by the user after logging in.
Groupadd
-r: join the group ID, which is lower than the 499 system account.
# userdel-r Delete the home directory
$?: execution status of the previous command
The status is represented by a number: 0-255
0: successful
1-255: failed, 1.2.127.255 reserved
File FILE..: views the format of the contents of the file
Tac: displaying files in reverse order
-exec COMMAND {}\;: execute the specified command on the found file
Find / var/log *-exec ls-l {}\