Guard Gerd
Linux Common commands
mkdir folder name mkdir Hello//Create new Folder
Touch filename Touch hello.txt//Create new file
VI File name VI aaa.html//edit, if the file is not created and into the edit
Vim filename vim aaa.txt//Highlight Edit
RM//Delete
RM-RF//Direct Delete
CP//Copy CP aaa.html/usr/local
Packaging and decompression
Unzip Xxx.zip
The TAR command uses
Compression: Tar CVFZ destination Document source Document 1 [Source Document 2 ...]
Example: Tar cvfz m.tar.gz hello.cpp hello.h //m.tar.gz is the target document, Hello.cpp and Hello.h are Source Document
Unzip: Tar XVFZ target Document
Example: Tar xvfz m.tar.gz//Extract compressed package document M.TAR.GZ in current directory
chmod 777 File
Most of us represent permissions in the form of three-bit octal digits, the first specifies the owner's permission, the second specifies the group permissions, and the third refers to
The permissions of other users, each with 4 (read), 2 (write), 1 (execution) of three numeric values to determine the permissions. If 6 (4+2) represents a read
Write right, 7 (4+2+1) has read, write, and execute permissions.
+
Increase permissions
-
Delete permissions
=
Reassign permissions
R
Read
W
Write
X
Perform
-R
Recursively traverse subdirectories to apply changes to all files and subdirectories in the directory
U
Owner
G
Group
O
Other users
A
All Users
Example:
chmod u+x file adds execute permission to the owner of file
The chmod 751 file assigns read, write, and execute (7) permissions to the owner of the file, assigning read,
Perform (5) permissions to assign permissions to other users to execute (1).
chmod a-wr,a+x file Deletes write, read permissions to all users of file and increases the permissions to execute
chmod =x file reassign permissions to all users of file, only to execute permissions
Chmod-r u+r Directory Read permissions to the owner of all files and subdirectories in directory directory
Chmod-r a+rwx Directory assigns all users in the directory directory to all files and subdirectories read, write,
Permissions for rows
./install.sh
Init 0 is the shutdown system, init 1 restarts the system.
Shutdown-r now restarts the system after shutting down the system
Linux Common commands