Summarize the common Linux commands used in the work _ Classic

Source: Internet
Author: User
Tags bz2 file copy iptables

    • 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: For these parameters you can use man to help, note the case-sensitive.

Most are packaged with tar.gz and tar.bz2 software, mostly through./configure, make and make install, and some software is directly make;make installed

    • Common compression commands

Compression: tar-j c v-f filename.tar.bz2 file or directory name to be compressed
Query: tar-j t v-f filename.tar.bz2
Decompression: tar-j x v-f filename.tar.bz2-c directory to extract

    • Common Switch Machine commands

Shutdown command:
Shutdown can only be used for root privileges.
Init 0

Restart command:
Init 1
Reboot

    • Directory commands

Switch directories: The directory The CD wants to switch to
Always look at the current directory: PWD
View files in this directory: LS
[[email protected] bin]# ls--color display archive data in color
[[email protected] bin]# ls-l detailed file system structure
[[email protected] bin]# ls-a Show hidden Files (".") The opening file)
[[email protected] bin]# Ls-al also show hidden files and details
[[email protected] bin]# Ls-al|more to display the contents of the file in one page

Create new directory: mkdir new directory Name
Delete directory: RmDir directory name
If the directory has something, use the Rm-rf file directory

    • File command:

Overwrite the original file copy: Cp-rf source file Destination file
Overwrite the original file movement: Mv-i source File Destination file
View file contents: Cat
Compare two files different: diff

    • Find File command:

Find ls command directory: Whereis ls
Find a file with test: Find | grep ' Test '

    • Network command:

View 80 Port usage: NETSTAT-ANP | grep 80

Download command: wget http://example.com/packages/
Case of bulk Download: Wget-i filename.txt
Put the link address inside filename.txt

View IP information: ifconfig

    • the use of software in RMP class ;

Installation: Rpm-i your-package.rpm

Query for installed PCRE packages: Rpm-qa | grep pcre

Remove Pcre Package: rpm-e--nodeps pcre-6.6-2.el5_1.7

Upgrade: RPM-UVH xxxxx.rpm <== will xxxxx.rpm upgrade

    • Shutdown and start of Linux firewall

1) effective after reboot
Open: Chkconfig iptables on
OFF: Chkconfig iptables off
2) immediate effect, failure after reboot
Open: Service iptables start
Close: Service iptables stop

    • Avira command
Avira command: Find related processes: PS aux | grep program_filter_word avira Command: killall-9 nginx//Kill Nginx process to view the website's server situation: Curl--head www.sohu.com

    • Other commands:

Yum installation software: Yum install autoconf

Add Apache Boot:

echo "/usr/local/apache/bin/apachectl start" >>/etc/rc.local

Summarize the common Linux commands used in the work _ Classic

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.