I. File, directory Operation command
1. ls command
Features: Displays information about files and directories
LS Displays the list of current directory files by default
Ls-a Show all files including hidden files
Ls-l display file attributes, including size, date, symbolic connection, whether read-write and executable
LS-LH Show file size, print file size in easy-to-understand format (e.g. 1K 234m2g)
LS-LT display files, sorted by modified time
2. CD command
Function: Renaming directory
cd dir switch to dir directory in current directory
CD/Switch to root directory
Cd.. Switch to the top level directory
Cd.. /.. Switch to the top level two directory
CD ~ Switch to the user directory, such as the root user, then switch to/root
3. CP command
Function: Copy file
CP Source target copies the file source to target
Cp/root/source. Copy the file source under/root to the current directory
Cp–av soure_dir target_dir Copy the entire directory, both directories are exactly the same
4. RM command
Features: Deleting files or directories
RM file Deletes a file
Rm-f file deletion is not prompted. Can be used with the R parameter
RM-RF dir Delete the entire directory called Dir in the current directory
5. MV Command
Function: Move the file away, or change the name, under the Uinx not renamed the command, if you want to rename, you can use the command
MV Source Target renames the file source to target
6. diff
Function: Compare file contents
Diff Dir1 Dir2 compares the file list of directory 1 with directory 2, but does not compare the actual contents of the file, but lists
diff file1 File2 Compare file 1 with the contents of file 2 is the same, if it is a text format of the file, it will be different content display, if the binary code only means that two files are not the same
Comm file1 file2 comparison file showing two different files
7. LN command
Features: Establish links. The shortcut to Windows is based on the principles of the link.
ln source_path Target_path Hard Connection
Ln-s source_path Target_path Soft Connection
Second, view the file Contents command
1. Cat commands
Displays the contents of the file, the same as the DOS type
Cat file
2. More Commands
Features: Pagination display commands
More file
The more command can also be passed through the pipe character (|) Used with other commands, such as:
PS Ux|more
Ls|more
3. Tail command
Function: Displays the last few lines of the file
Tail-n aaa.txt display the last 100 lines of a file Aaa.txt file
4. VI Command
VI File Edit files
VI Original BASIC use and command:
Enter the command by pressing the [ESC] key first, and then entering: w (write to file): w! (Do not ask the way to write the file): Wq Save and exit,: Q Quit, q! do not save the exit
5. Touch command
Function: Create an empty file
Touch Aaa.txt creates an empty file with a file name of Aaa.txt
Iii. Basic System commands
1. Man command
function: Check the help of a command, if you do not know the use of a command do not understand, you can ask him, he knows to tell you back
For example:
Man LS display Help content for LS command
2, W command
Features: Displays details of the logged-on user
For example:
sarge:~# W
22:06:51 up min, 1 user, Load average:0.00, 0.00, 0.00
USER TTY from [email protected] IDLE jcpu PCPU
Zhoulj pts/0 10.140.0.109 21:24 0.00s 0.85s 0.09s sshd:zhoulj [Priv]
3. Who command
Features: Show logged in user
For example:
sarge:~# who
Zhoulj pts/0 Mar 13 21:24 (10.140.0.109)
4. Last Order
Features: View recent User Login Systems
For example:
sarge:~# Last
Zhoulj pts/0 10.140.0.109 Mon Mar 21:24 still logged in
Reboot system boot 2.6.8-2-386 Mon Mar 13 21:23 (00:43)
Zhoulj pts/0 10.140.0.105 Sun Mar 22:51-down (00:00)
Zhoulj pts/0 10.140.0.105 Sun Mar 12 22:51-22:51 (00:00)
Root tty1 Sun Mar 22:50-down (00:01)
Root tty1 Sun Mar 12 22:46-22:48 (00:02)
Root tty1 Sun Mar 12 22:43-22:46 (00:02)
Reboot system boot 2.6.8-2-386 Mon Mar 13 06:34 ( -7:-41)
Wtmp begins Mon Mar 13 06:34:11 2006
5. Date command
Function: System Date setting
Date Displays the current date time
Date-s 20:30:30 Set the system time to 20:30:30
Date-s 2002-3-5 Set the system period for 2003-3-5
Date-s "060520 06:00:00" sets the system period to May 20, 2006 6 o'clock full.
6. Clock command
function: Clock setting
Clock–r read time parameters in the system BIOS
Clock–w writes the system time (such as the time set by date) to the BIOS
7. uname command
Function: View System version
Uname-r shows the version of the operating system kernel
For example:
sarge:~# uname-a
Linux Sarge 2.6.8-2-386 #1 Tue 12:46:35 UTC 2005 i686 Gnu/linux
8. Shutting down and restarting system commands
Reboot restart your computer
Shutdown-r Now restarts the computer, stops the service, and then restarts the computer
Shutdown-h now shut down the computer, stop the service, and then shut down the system
Halt shutting down the computer
Generally with Shutdown-r now, in rebooting the system is to close the related services, Shutdown-h now is also the case.
9. su command
Function: Switch User
Su-Switch to root user
SU-ZHOULJ switch to ZHOULJ user,
Note:--he is critical, using--that will use the user's environment variable
Iv. Monitoring System Status commands
1. Top command
Features: View system CPU, memory and other usage
2. Free command
Function: view memory and swap partition usage
For example:
sarge:~# Free-tm
Total used free shared buffers Cached
mem:187 42 145 0 6 16
-/+ buffers/cache:19 167
swap:243 0 243
total:430 42 388
3, uptime
Function: The current time, the system is running to the time elapsed now, the number of users connected, the last minute, five minutes and 15 minutes of system load
For example:
sarge:~# Uptime
21:54:46 up to Min, 1 user, Load average:0.00, 0.00, 0.00
4. Vmstat command
Function: Monitor virtual memory usage
For example:
# Vmstat
Procs Memory Swap IO system CPU
R b swpd free buff cache si so bi bo in CS US sy ID WA
1 0 0 63704 8100 32272 0 0 8 3 103 17 0 1 98 1
5. PS command
Function: Show process information
PS UX shows the current user's process
PS uxwww Show details of the current user's process
PS aux shows process for all users
PS EF Display system all process information
6. Kill command
Function: Kill a process, the process number can be obtained through the PS command
Kill-9 1001 Kill a program with process number 1001
Kill all-9 Apache kills all programs named Apapche, Kill is not omnipotent, and the zombie program is invalid.
Five, disk Operation command
1. DF command
function: Check the disk space consumption of the file system. You can use this command to get information about how much space the hard disk is taking up, and how much space is left.
Parameter function
-A Lists all directories
-TA Lists all directories and displays file types
-B Display block information
-I list all directories with the I node
-H Display according to daily habits (e.g. 1K, 100M, 20G)
-X [Filesystype] does not display [Filesystype]
For example:
# df-th
Filesystem Type Size used Avail use% mounted on
/DEV/SDA1 ext3 265M 64M 187M 26%/
Tmpfs tmpfs 94M 0 94M 0%/dev/shm
/dev/sda6 ext3 714M 8.1M 667M 2%/Home
/dev/sda8 ext3 956M 215M 691M 24%/usr
/DEV/SDA7 ext3 714M 57M 619M 9%/var
2. du command
Function: Detects a directory and (recursively) the disk space occupied by files in all its subdirectories.
Parameter function
-S [dirName] displays the total space occupied by the directory
-sk [DirName] Display directory occupies total space, in K units
-SB [DirName] Displays the total space occupied by the directory, in units B
-SM [DirName] Displays the total space occupied by the directory, in M
-SC [DirName] Displays the total space occupied by the directory, plus the catalog statistics
-sh [DirName] statistics only directory size
For example:
# DU-SH/ETC
1.3m/etc
3. Mount command
Features: Use the mount command to mount various file systems in Linux.
Format: MOUNT-T device name mount point
(1), mount/dev/sda1/mnt/filetest
Mount-t Vfat/dev/hda/mnt/fatfile
Mount-t Ntfs/dev/hda/mnt/ntfsfile
Mount-t Iso9660/dev/cdrom/mnt/cdrom
Mount-o Device Name Mount point
(2), using USB device
Modprobe Usb-storage
Mkdir/mnt/usb
Mount-t Auto/dev/sdx1/mnt/usb
Umount/mnt/usb
4. Mkswap command
Function: Use the MKSWAP command to create swap spaces, such as:
debian:~# mkswap-c/DEV/HDA4
debian:~# swapon/dev/hda4 #启用新创建的swap空间, disable the Use Swapoff command
5. fdisk command
Function: Partitioning the disk
fdisk/dev/xxx format xxx device (XXX refers to the name of the disk drive, for example, HDB,SDC)
FDISK-L display the partition table of the disk
6. MKFS command
Function: Format file system, you can specify the type of file system, such as ext2, ext3, FAT, NTFS, etc.
Format 1:mkfs.ext3 options/dev/xxx
Format 2:mkfs-t ext2 options/dev/xxx
Parameter function
-B Block Size
-I node capitalization
-m reserved administrative space size
For example:
debian:~ #mkfs. ext3/dev/sdb1
7. E2fsck command
Features: Disk detection
E2FSCK/DEV/HDA1 Check/dev/hda1 If there is a file system error, prompt repair method
E2fsck-p/dev/hda1 Check/dev/hda1 If there is an error, if any, fix it automatically
E2fsck-y/dev/hda1 Check error, all questions are executed in Yes mode
E2fsck-c/dev/hda1 Check if the disk has a bad zone
8. TUNE2FS command
Function: Adjust the parameters of the Ext2/ext3 file
Parameter function
-L View File system Information
-C Set the number of forced self-test mounts
-I set the mandatory self-test interval, per day
-m reserved percentage of blocks
-j converting ext2 file system to EXT3 format
# tune2fs-l/DEV/SDA1
9. DD Command
function: function: Copy the specified input file into the specified output file, and can be converted in format during the copy process.
Similar to the DOS diskcopy command.
DD if=/dev/fd0 of=floppy.img Copy the contents of the floppy disk into one image
DD if=floppy.img of=/dev/fd0 Copy the contents of an image to a floppy disk, which is often used when making a drive disk.
Vi. user and group related commands
1. Groupadd command
Features: Adding groups
Groupadd test1 Add test1 Group
Groupadd-g 1111 test2 add test2 Group with group ID 1111
2. Useradd command
Features: Adding users
Useradd user1 Add user user1,home to/home/user1, group User1
Useradd-g test1-m-d/home/test1 test1 Add user test1,home to/home/test1, group Test1
User list shows logged-in users
3. passwd command
Function: Change user password
passwd user1 modify password for user User1
Passwd-d root deletes the root user's password
4. Userdel command
Function: Delete User
Userdel User1 Delete user1 user
5. Chown command
Function: Change the owner of a file or directory
Chown User1/dir Set the/dir directory to user1 all
Chown-r User1.user1/dir will/dir all files and directories under the directory, set to User1 all, group User1. -R recursion to each file and directory below
6. CHGRP command
Function: Change all groups of files or directories
Chgrp User1/dir Set the/dir directory to user1 all
7. chmod command
Function: Change user's permissions
chmod a+x file to set the file to executable, the script class file must be set this way, otherwise you have to use bash file to execute
chmod 666 file is set to read/write
chmod the file is set to, the owner is the full permission, the same group can read and execute, other no permissions
8. ID command
Function: Display the user's information, including UID, GID, etc.
# ID ZHOULJ
uid=500 (ZHOULJ) gid=500 (ZHOULJ) groups=500 (ZHOULJ)
9. Finger command
Function: Display the information used
Note: There is no such command under Debian.
# finger Zhoulj
Login:zhoulj Name:
Directory:/home/zhoulj Shell:/bin/bash
On since Sun 07:59 (CST) on pts/0 from 192.168.1.4
No Mail.
No Plan.
Seven, compression command
1. gzip Format command
Features: Compressed files, GZ format
Note: The resulting file will overwrite the source file
Gzip-v compress files and show progress
-D Decompression
Gnuzip-f Decompression
For example:
# gzip A.sh
#ll
-rwxr-xr-x 1 root root 71 December 21:08 a.sh.gz
# gzip-d A.sh.gz
#ll
-rwxr-xr-x 1 root root 48 December 21:08 a.sh
2. zip Format command
Function: Compress and decompress zip commands
Zip
Unzip
For example:
# Zip A.sh.zip a.sh
adding:a.sh (stored 0%)
# LL
-rw-r--r--1 root root 188 May 10:37 A.sh.zip
# Unzip A.sh.zip
Archive:a.sh.zip
Replace a.sh? [Y]es, [N]o, [A]ll, [N]one, [R]ename:r
New name:a1.sh
extracting:a1.sh
# LL
-rwxr-xr-x 1 root root 48 December 21:08 a1.sh
3. Bzip2 Radical Command
Function: bzip2 format compression command,
Note: The resulting file will overwrite the source file
Bzip2
Bunzip2
For example:
# bzip2 A.sh
# LL
-rwxr-xr-x 1 root root 85 December 21:08 a.sh.bz2
# BUNZIP2 A.SH.BZ2
# LL
-rwxr-xr-x 1 root root 48 December 21:08 a.sh
4. Tar command
Function: archive, compress, etc., more important, will be used frequently.
-CVF compressing files or directories
-XVF unzip a file or directory
-ZCVF compressed file or, format tar.gz
-ZXVF unzip the file or, format tar.gz
-ZCVF compressed file or, format tgz
-ZXVF unzip the file or, format tgz
Example:
# tar CVF abc.tar *.sh
# tar XVF Abc.tar
# tar CZVF abc.tar.gz *.sh
# LL
-rw-r--r--1 root root 20480 May 10:50 Abc.tar
-rw-r--r--1 root root 1223 May 10:53 abc.tar.gz
# tar XZVF abc.tar.gz
Eight, network-related commands
1. Ifconfig command
Function: Display information to modify NIC
Ifconfig Displaying network information
Ifconfig eth0 display eth0 Network information
To modify network information:
Ifconfig eth0 192.168.1.1 netmask 255.255.255.0 Set the address of the network card 1 192.168.1.1, the mask is 255.255.255.0
Ifconfig Eth0:1 192.168.1.2 The second address of the bundled NIC 1 is 192.168.1.2
Ifconfig eth0:x 192.168.1.N Bundle NIC 1 The nth address is 192.168.1.N
For example:
# ifconfig Eth0:1 192.168.1.11
# ifconfig
Eth0 Link encap:ethernet HWaddr 00:0c:29:06:9c:24
inet addr:192.168.1.5 bcast:192.168.1.255 mask:255.255.255.0
Up broadcast RUNNING multicast mtu:1500 metric:1
RX packets:4220 errors:0 dropped:0 overruns:0 frame:0
TX packets:3586 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:342493 (334.4 KB) TX bytes:469020 (458.0 KB)
Interrupt:9 Base address:0x1400
Eth0:1 Link encap:ethernet HWaddr 00:0c:29:06:9c:24
inet addr:192.168.1.11 bcast:192.168.1.255 mask:255.255.255.0
Up broadcast RUNNING multicast mtu:1500 metric:1
Interrupt:9 Base address:0x1400
2. Route command
Features: Displays current routing settings
The route shows the current routing settings, which is slower and less common.
Route add-net 10.0.0.0 netmask 255.255.0.0 GW 192.168.1.254 add static route
Route del-net 10.0.0.0 netmask 255.255.0.0 GW 192.168.1.254 add static route
Route add default GW 192.168.1.1 Metric1 set 192.168.1.1
Route del default deletes the defaults
Example:
# route add-net 10.0.0.0 netmask 255.255.0.0 GW 192.168.1.254
# NETSTAT-NR
Kernel IP Routing Table
Destination Gateway genmask Flags MSS Window Irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.0.0.0 192.168.1.254 255.255.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
# route del-net 10.0.0.0 netmask 255.255.0.0 GW 192.168.1.254
# NETSTAT-NR
Kernel IP Routing Table
Destination Gateway genmask Flags MSS Window Irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
3. Netstat command
Function: Display network status
Netstat-an Viewing network port information
NETSTAT-NR View the routing table information, much faster than the route,
4, the command to start the network
Commands of the Redhat family:
/etc/init.d/network
Debian command:
/etc/init.d/networking
For example:
/etc/init.d/network Stop Stop Network,
/etc/init.d/network Start Network,
5, manually modify the network configuration
(1), Debian system
The configuration file location is:/etc/network/interfaces
# The Loopback network interface
Auto Lo
Iface Lo inet Loopback
# The Primary network interface
Auto Eth0 eth1
Iface eth0 inet Static
Address 10.4.5.6
Netmask 255.255.255.0
Network 10.4.5.0
Broadcast 10.4.5.255
Iface eth1 inet Static
Address 219.25.5.60
Netmask 255.255.255.192
Network 219.25.5.0
Broadcast 219.25.5.63
Gateway 219.25.5.30
After you save the configuration after you modify it, run
/etc/init.d/networking restart
The network configuration is changing
(2), Redhat system
The configuration file location is:/etc/sysconfig/network-scripts/ifcfg-eth0
Device=eth0
Bootproto=static
broadcast=192.168.1.255
ipaddr=192.168.1.5
netmask=255.255.255.0
network=192.168.1.0
gateway=192.168.1.254
Onboot=yes
Type=ethernet
After you save the configuration after you modify it, run
/etc/init.d/network restart
Or
Service Network restart
The network configuration is changed.
The location of the default DNS file is:/etc/resolv.conf
#cat/etc/resolv.conf
Search test.com.cn
NameServer 192.168.1.11
6. Network troubleshooting
(1), ping command
Function: Do not say, do not know to use dry this line.
Ping
(2), traceroute command
Features: route tracking
Traceroute
Traceroute 207.68.173.7
(3), nslookup command
Function: Domain name resolution troubleshooting
For example:
$ nslookup
Note:nslookup is deprecated and may removed from the future releases.
Consider using the ' dig ' or ' host ' programs instead. Run nslookup with
The '-sil[ent ' option to prevent this message from appearing.
>
server:192.168.1.11
address:192.168.1.11#53
Non-authoritative Answer:
Name:
address:202.118.66.66
> Server 202.118.66.6
Default server:202.118.66.6
address:202.118.66.6#53
>
server:202.118.66.6
address:202.118.66.6#53
Non-authoritative answer:canonical name =
.
Name:
address:202.108.22.5
Ix. Other Orders
1. SSH command
Function: remote login to other UNIX hosts
Ssh-l user1 192.168.1.2 Login to 192.168.1.2 using user name User1
Ssh
Login to 192.168.1.2 using username user1
2. SCP command
Features: Secure copy
For example:
SCP abc.tar.gz
: ~ Copy the local abc.tar.gz to the root of the 192.168.1.5 user1 user (/home/user1).
3. telnet command
Function: Login to remote host
For example:
Telnet 192.168.1.5
If you can't read it, there's another
Common directives
LS Display file or directory
-l list File details L (list)
-a lists all files and directories under the current directory, including Hidden A (all)
mkdir Creating a Directory
-P Create directory, if no parent directory, create p (parent)
CD Switch Directory
Touch creates an empty file
Echo creates a file with content.
Cat View File Contents
CP Copy
MV Move or rename
RM Delete File
-R Recursive Delete, can delete subdirectories and files
-F Force Delete
Find searches a file system for a file
WC statistics Text line number, word count, number of characters
Grep finds a string in a text file
RmDir Delete Empty Directory
Tree structure display directory, need to install tree package
PWD Displays the current directory
LN creates a linked file
More, less pagination displays text file contents
Head, tail display file header, tail content
CTRL+ALT+F1 command line full-screen mode
System administration Commands
Stat Displays details of the specified file, more detailed than LS
Who shows online login
WHOAMI Show current Operation user
Hostname Display host name
Uname Display System Information
Top dynamic display currently consumes the most resources process information
PS Display transient process status Ps-aux
Du view directory size Du-h/home with units display directory information
DF View disk size df-h with unit display disk information
Ifconfig Viewing network conditions
Ping Test network connectivity
Netstat Displaying network status information
Man command won't work, find men like: Guy ls
Clear Clear Screen
Alias renamed the Command as: Alias showmeit= "Ps-aux", in addition to de-use Unaliax Showmeit
Kill kills the process, you can first view the process ID with the PS or Top command, and then kill the process with the kill command.
Packaging compression-related commands
Gzip:
BZIP2:
Tar: Packaging compression
-C Archive File
-X Compressed file
-Z gzip Compressed file
-j bzip2 Compressed Files
-V shows the compression or decompression process V (view)
-F Use file name
Cases:
TAR-CVF/HOME/ABC.TAR/HOME/ABC only packaged, not compressed
TAR-ZCVF/HOME/ABC.TAR.GZ/HOME/ABC packaged and compressed with gzip
TAR-JCVF/HOME/ABC.TAR.BZ2/HOME/ABC packaged and compressed with bzip2
Of course, if you want to decompress, just replace the above command TAR-CVF/TAR-ZCVF/TAR-JCVF "C" in the "X".
Shut down/Restart the machine
Shutdown
-R shutdown Restart
-H shutdown does not restart
Now turn the machine off.
Halt shut down the machine
Reboot restart
Linux Pipelines
Use the standard output of one command as the standard input for another command. That is, the combination of several commands to use, the latter command in addition to the results of a previous command.
Example: Grep-r "Close"/home/* | More in the home directory to find all files, including close files, and paging output.
Linux Package Management
Dpkg (Debian package) management tool with a. deb suffix. This approach is suitable for systems that are not networked.
For example, install the tree command installation package, first upload tree.deb to the Linux system. Then install it using the command below.
sudo dpkg-i tree_1.5.3-1_i386.deb installation software
sudo dpkg-r tree Uninstall software
Note: There are several ways to upload tree.deb to a Linux system. Vmwaretool, use of Mount mode, use of WINSCP tools, etc.;
APT Advanced Packaging Tool. This method is suitable for the system to be able to connect the internet situation.
Still take tree as an example
sudo apt-get install tree
sudo apt-get remove tree unload tree
sudo apt-get update software
sudo apt-get upgrade
Convert. rpm files to. deb files
. RPM is the software format used by Redhat. cannot be used directly under Ubuntu, so you need to convert it.
sudo alien abc.rpm
Vim use
Vim three modes: Command mode, insert mode, edit mode. Use ESC or I or: to toggle the mode.
Command mode:
: Q exit
: q! Force exit
: Wq Save and exit
: Set number Displays line numbers
: Set Nonumber hidden line number
/apache find Apache in the document press N to jump to the next, Shift+n previous
YYP Copy the cursor line, and paste
H (move left one character ←), J (next line ↓), K (previous line ↑), L (move right one character →)
User and User group management
/etc/passwd Storing user accounts
/etc/group Storage Group Account
/etc/shadow Store password for user account
/etc/gshadow Password to store user group account
Useradd User Name
Userdel User Name
AddUser User Name
Groupadd Group Name
Groupdel Group Name
passwd root sets the password for root
Su Root
Su-root
/etc/profile System Environment variables
Bash_profile User Environment variables
. BASHRC User Environment variables
SU user switches the user and loads the configuration file. bashrc
Su-user switch User, load configuration file/etc/profile, load Bash_profile
User and user groups for changing files
sudo chown [-r] Owner[:group] {file| Directory}
For example: Also take jdk-7u21-linux-i586.tar.gz as an example. belongs to user Hadoop, group Hadoop
You want to switch the users and groups to which this file belongs. You can use commands.
sudo chown root:root jdk-7u21-linux-i586.tar.gz
File Rights Management
Three basic permissions
R read value represented as 4
The W write value is represented as 2
X executable value represented as 1
, the permissions for the jdk-7u21-linux-i586.tar.gz file are-rw-rw-r--
-rw-rw-r--altogether 10 characters, divided into four segments.
The first character "-" indicates a normal file, and the "L" link may also appear in this location; "D" means the directory
The No. 234 character "rw-" represents the permissions of the currently owned user. So the value is expressed as 4+2=6
The No. 567 character "rw-" represents the permissions for the group that is currently owned. So the value is expressed as 4+2=6
The No. 890 character "r--" represents other user rights. So the value is represented as 2
So the permission to manipulate this file is represented by a value of 662
Change permissions
sudo chmod [u belongs to user g belongs to group O Other User a All users] [+ Increase permissions-reduce permissions] [r W x] directory name
For example: There is a file filename, the permission is "-rw-r----x", the permission value is changed to "-rwxrw-r-x", with a numeric representation of 765
sudo chmod u+x g+w o+r filename
The above example can be represented by a numerical value
sudo chmod 765 filename
Http://www.daniubiji.cn/archives/25
The following shell commands in the Linux system