Basic Linux command format:
command [parameters] [path file]
The contents of square brackets can be omitted
To view the command help means:
1 Man command name (Mans can also get configuration file, function Help)
2 Command--help
3 Help command (for built-in commands)
4 Using Search Engines
Summary of COMMON commands:
Halt shutdown (init 0)
Reboot restart (init 6)
PNS Shutdown-r Now (restart)-H now (off)
Last Show list of users who have logged in
Lastlog reports the recent landing of all users
File type display
Mknode creating character devices and block devices
DUMPE2FS displays information about the Ext2,ext3,ext4 file system.
DF Report File system disk space usage
-I displays inode information instead of disk usage information
-H display file size in a reasonable unit, convenient for users to read, such as K,m
SED filter and convert text
-N cancels the default output
-D Delete the specified content
-P Print the specified content
The source allows the modified configuration file to take effect immediately
-Ln Creates a link
-S Create symbolic connection
+ More view files, cannot roll back
+ Less view files can be rolled up
RunLevel View the current operating level of the system
Set environment variables such as export lang= "ZH_CN. GB18030 "
The tar file compression and decompression command
such as Tar zcvf txt.tar.gz./test Package The Test folder under the current directory
Tar tf txt.tar.gz View txt.tar.gz Compressed Package Contents
Tar zcvf txt2.tar.gz--exclude=test/a./test Compress files other than file A in the Test directory into txt2.tar.gz
Tar zcvfx txt3.tar.gz a.txt./test package All files in the Test directory except the file name in the A.txt file
Tar xvf txt.tar.gz-c/home/extract txt.tar.gz file to/home/directory
Tar jcvf txt.tar.bz./test BZ Package Command uncompressed with tar jvf txt.tar.bz-c/home/command
-Z Compress document with gzip-X invoke gzip unpack package
-C Create a new document
-V processing Process output related information
-F operation of ordinary files
-x specifies excluded content, which is typically used to exclude multiple targets
-c Specifies the unzip directory
-j BZ Packaging command
TF View Compressed Package Contents
--exclude Exclude specified content
Cut the string and select the Require content command
such as: echo "I am a Student" | Cut-d ""-f1,4 with a space separator, cut "I am a student", select the first and fourth columns, i.e. I student
echo "I am a Student" | Cut-c 1,8-cuts each character, selects the first character, and the eighth character starting at the end, i.e. istudent
-D Specify delimiter
-F Specify Selection
-C Cut each character
The number of lines, characters and bytes of the WC print file
-l display number of file lines
-W Display file word Count
-C byte number
The PS display process
Useradd Add Users
passwd Modify User Password
Groupadd Add Group
The stat displays file or file system status
Linux Basic Command Explanation (ii)