- Common decompression commands
Tar.bz2 command: tar-jxvf * .tar.bz2
Tar. z command: tar-zxvf *. tar. z
Tar.gz command: tar-Zxvf * .tar.gz
PS: You can use man to help with these parameters. Note that these parameters are case sensitive.
The software package with tar.gz and tar.bz2 is mostly installed through./configure; make install; some software is directly make; make install
- Common compression commands
Compression: name of the file or directory to be compressed by tar-j c v-f filename.tar.bz2
Query: tar-j t v-f filename.tar.bz2
Decompress: tar-j x v-f filename.tar.bz2-C directory to be decompressed
Shutdown command:
Shutdown is available only with the root permission.
Init 0
Restart command:
Init 1
Reboot
Switch Directory: directory to be switched by cd
The current directory is pwd.
View the files in this directory: ls
[Root @ Tsai bin] # ls -- color displays the archives in color
[Root @ Tsai bin] # ls-l list the file system structure in detail
[Root @ Tsai bin] # ls-A: Show Hidden Files (Files starting)
[Root @ Tsai bin] # ls-Al displays hidden files and details at the same time
[Root @ Tsai bin] # ls-Al | more displays the file content on one page
Create a new directory: mkdir new directory name
Delete Directory: rmdir directory name
If the directory contains something, use the RM-RF file directory.
Overwrite the copy of the original file: the target file of the CP-RF Source File
Overwrite the movement of the original file: target file of the MV-I source file
View File Content: Cat
Compare two different files: Diff
Find the LS command directory: whereis ls
Find the file with test: Find | grep 'test'
View port 80 usage: netstat-anp | grep 80
Download command: wget http://example.com/packages/
Batch download: wget-I filename.txt
Store the link address in filename.txt.
View IP address and other information: ifconfig
Installation: rpm-I your-package.rpm
Query the installed pcre package: rpm-qa | grep pcre
Delete pcre package: rpm-e -- nodeps pcre-6.6-2.el5_1.7
Upgrade: rpm-Uvh xxxxx. rpm <= upgrade xxxxx. rpm
- Disable and enable Linux Firewall
1) takes effect after restart
Enable: chkconfig iptables on
Close: chkconfig iptables off
2) takes effect immediately and becomes invalid after restart
Enable: service iptables start
Disable: service iptables stop
Command: Search for related processes: ps aux | grep program_filter_word command: killall-9 nginx // kill nginx process to view the server status of the Website: curl -- head www.sohu.com
Yum Installation Software: yum install autoconf
Add apache boot self-start:
Echo "/usr/local/apache/bin/apachectl start">/etc/rc. local