SSH commands commonly used in Linux environments

Source: Internet
Author: User
Tags bz2 gz file

Directory operations: RM-RF Mydir/*Delete Mydir directory*/mkdir dirname/*Create a directory named DirName*/CD Mydir/*Enter the Mydir directory*/cd–/*go back to the top level directory*/CD../*back to parent directory with spaces in the middle*/adb~/*back to root directory*/MV Tools Tool/*Rename the Tools directory to tool*/LN-S tool BAC/*to the tool directory to create a symbolic link named BAC, the most familiar should be ftp in the WWW link to the public_html directory*/CP-A tool/home/vpser/www/* Copy all files under the tool directory to the WWW directory */file operation: RM Go.tar/*Delete go.tar file*/Find mt.cgi/*find files with file name mt.cgi*/df–h/*look at the remaining space on the disk, as if it's not necessary, unless you're too much.*/decompression: Tar xvf wordpress.tar/*unzip files in tar format*/Tar-TVF Myfile.tar/*view files that are contained in a tar file*/tar CF Toole.tar tool/*Package The tool directory as a Toole.tar file*/tar cfz vpser.tar.gz tool/*Package The tool directory and compress it into a vpser.tar.gz file because the. tar file is almost uncompressed, and the. tar.gz file for MT is extracted to a. tar file, almost 10MB*/Tar jcvf/VAR/BAK/WWW.TAR.BZ2/var/www//*create a. tar.bz2 file with high compression rate*/tar xjf www.tar.bz2/*Unzip tar.bz2 format*/gzip-D ge.tar.gz/*unzip the. tar.gz file to a. tar file*/Unzip Phpbb.zip/*unzip the zip file, under Windows to compress A. tar.gz formatted file It's still a little tricky.*/download File: wget http://soft.vpser.net/web/nginx/nginx-0.8.0.tar.gz/*download the files on the remote server to their own server, even the upload is saved, the server is not 100M is 1000M bandwidth, download a 2-3 trillion MT is not a few 10 seconds*/wget-C http://soft.vpser.net/web/nginx/nginx-0.8.0.tar.gz/*continue downloading files that were not downloaded last*/Process Management: PS-aux/*PS Process status Query command*/meaning of the PS command output field: [List][*]user, the user name of the process owner. [*]pid, the process number that uniquely identifies the process. [*]%CPU, the percentage of CPU time and total time that the process has occupied since the most recent refresh. [*]%MEM, the percentage of memory that the process uses. [*]vsz, the amount of virtual memory used by the process, in K. [*]rss, the total number of physical memory that the process occupies, in K. [*]tty, process-related terminal name. [*]stat, Process State, with (r – Run or ready to run; s-sleep state; I – idle; Z – Frozen; D – uninterrupted sleep; WThe process does not have a resident page; t stops or tracks. ) These letters to indicate. [*]start, the process starts running time. [*]time, the total CPU time used by the process. [*]command, the command line that is executed. [/LIST]PS-aux | grep nginx/*in all processes, look for nginx processes*/Kill1234/*1234 is the process ID, which is the PID in Ps-aux*/killall Nginx/*Killall through the name of the program, directly kill all processes, Nginx for the process name*/Vim operation: Mobile class: H/J/K/L: Left/bottom/up/Shift Right One w: Move backward (number of words in front of numbers) B: Move forward (number of words to move) E: Move backwards to the end of the word GE: move forward to the end of the word $<End>: End of line0 <Home>: Start of TX: Find the bank's X to the right and move it (uppercase to the left) 33G: Move to the 33rd line of the file GG: First line of File G: End of File line33%: 33% of filesOffice H/M/L: First/middle of screen/Tail Line ZT/ZZ/ZB: The current line moves to the top/middle of the screenBottom Jump: ": Go back to the place where the jump comes ctrl-O: Jump to an "older" place Ctrl-I <Tab>: Then jump to a "newer" place to find:/: Look down (add keyword)?: Look up (post keyword) n: Next matching record edit: I: Convert to insert mode x: Delete current character.: Repeats the last modification operation (with PS Ctrl+F Execute filter) U: Undo Operation Ctrl-R: Redo P: Insert the deleted character into the current position (put) exit Save:: Q: Exit: Q!: Do not save exit ZZ: Exit after saving: E! : Discard modification and re-edit

SSH commands commonly used in Linux environments

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.