Summary of Common Linux commands

Source: Internet
Author: User
Tags thread class

1. Time Date class date and Cal2. File Directory class pwd, displays the current directory lsls-d directory name, displays whether there is a directory with the name of the Ls-r directory name, recursively view the contents of the directory only list Ls-lf|grep ^dls-lf|grep/$ The meaning of F is to classify the file according to the type, and add/or * symbols at the end of the symbol | The connector means to pass the result of the preceding command as input to the following command grep/$ means to pick out the line from the/end of the grep ^d means to pick out the line mkdir that starts with D, Create a new directory RMDIRTOUCHCD, switch directory CP, copy file or directory CP source dest function is copy file Cp-r sourcefolder targetfolder recursively copy entire folder rm, remove file or directory RmDir Deleteemptyfolder Delete Empty directory rm-rf DeleteFile recursively delete all contents of the directory MV, move files and directories or rename MV Oldnamefile newnamefile re-command mv/temp/movefile/ TargetFolder moving file cat, starting with the first line displaying the file contents The TAC starts with the last line, and you can see that the TAC is backwards written by cat! More one page of the display file content less than more similar, but more than the more supported features head only a few lines head-n example.txt view file header 10 lines tail only look at the tail a few lines tail-n example.txt check Look at the file header 10 lines History knocks command Historical redirect command echo $PATH print information 3. Network configuration class IPCONFIG4. disk partition Class 5. Search Find class ①find Find file or directory interpretation: Find file or directory command: find+ search path + parameter + Search keywords by file name: Find/home/esop-name ' *.txt ' based on name find/directory Filename.txt file. By Owner: Find/home/esop-user esop②grep searches within the file for string matching rows and outputs grep+ parameters + Find content + source file parameters:-C: Outputs only the count of matching rows. -I: Case insensitive (only for single-character). -H: The file name is not displayed when querying multiple files. -L: Only file names that contain matching characters are output when querying multiple files. -N: Displays matching lines and line numbers. -S: does not display error messages that do not exist or have no matching text. -V: Show noAll lines that contain matching text. 6. The process thread class ①ps the most common way to Ps-aux, then uses a pipe symbol to direct to grep to find a specific process, and then action on a particular process PS-EF is to display all processes in full format-e display all processes. -F full format. Kill process: ②netstat View the usage of port 8080 as follows ③ see which program the port belongs to Lsof-i 63797. Compression and decompression compression: TAR-ZCVF XXX.tar.gz n1.txt n2.txt Decompression: TAR-ZXVF XXX.tar.gz8. Performance optimization class, the last time the question Chuanjiang when the combination of Jvmtop machine performance 1) Linux system current time 2) from the boot to the current run for how long, 3) currently has several users connected to the host 4) load Balancing, When three values are added and divided by 3 results greater than 0.6 indicates a need to pay attention to the server burden. 5) CPU Utilization 6) 99.8%id, the ID is the system idle process= processor idle time percentage, the larger the better 7) swap, the value of the swap partition

Summary of common commands for Linux

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.