Alias gives the command a nickname
$ C= ' Clear '
CD changes the current path
$ cd/etc Change the current path to/etc $ CD back home directory $ CD. Go back to the previous level directory $ CD-back to the directory you just went to
CP Copy files or directories
The CP file file1 copies a file for File1 to the current directory CP Dir1 Dir2-r
chmod changing file permissions
chmod u+r File adds owner read-only permission chmod u-w file to file minus owner write-only permission chmod u=x file causes file owner to have execute permission on file only chmod 777 File enables file to have read writable executable permissions for all users
Chown changing the owner of a file
chown Foo file changes the file owner to foo chown:bar file to change the file owning group to bar chown Foo:bar file to change the file owner to the owning group Foo and bar
Clear Clear Screen
Cat file Displays the file contents to the screen
Find Files
Find ~/-name "*.c"//Find out all of the. c files found in the home folder find ~/-type F//Find all the common files in the home directory
grep looks up a string in a file
grep "abc" example.c grep "Apple"/opt/src/*.c-rwnh Find/opt/src-type F | Xargs grep "Apple"-wnh-r if there is a subdirectory, recursive lookup-W strictly matches the specified word-n prints line number-H print file name
Ifconfig Finding IP addresses
Ifconfig Find IP address ifconfig, ifconfig eth0 192.168.0.11 Modify IP address ifconfig eth0 down network ifconfig eth0 up start Network
Kill sends a specified signal to the specified process or process group
Kill-s SIGKILL 1234 kill-s SIGKILL-1234//Send the signal to the process group KILL-9 1234//Send a signal named 9 to process number 1234
LS lists the current file information
LS lists the names under the current directory ls-l the details of the files in the current directory ls-a lists the files in the current directory (including hidden files)
LN takes an alias or creates a shortcut to a file
ln file1 file2//Hard connect two aliases of the same name ln a.txt lna.tex-s//Soft Connect create a shortcut key for A.txt
More/less split Screen Display
More file less file Ps-ef | More Ps-ef | Less
Man Find help Manual
Man LS help manual for finding LS
MV Move or rename
MV file1 file2 rename file1 to file2 mv file dir/move file to dir/
mkdir Creating an empty directory
mkdir dir
PWD Print Current working path
PS Viewing system process details
Ps-ef
RM Delete a file or directory
RM File Delete file RM dir-r Delete directory Add-r permission not enough add sudo in front
Sort sorts
Sort file prints out the contents of file files in sorted order
Touch creates an empty file
Touch file
Tar compression and decompression
TAR-CJF a.tar.bz2 *//compress all files into. bz2 format TAR-XJF a.tar.bz2//bz2 format extract TAR-CZF a.tar.gz *//compress all files into. gz format TAR-XZF a.tar.gz//gz Format decompression
Which find the path to a command
which LS
WC calculates the number of lines, words, and characters of a file.
WC file WC file1 file2-w The number of words in the files-l file number of characters-C file the number of bytes of the-m file
There is a supplement that will continue to be perfected.
This article is from the "Star Moon Love" blog, please be sure to keep this source http://xuegodxingyue.blog.51cto.com/5989753/1960926
Commands commonly used by the shell