Linux VPS Under the common command of SSH _linux

Source: Internet
Author: User
Tags bz2 extract zip file gz file parent directory sleep ssh vps
Directory Operations:
RM-RF Mydir/* Delete Mydir directory * *
CD mydir/* Enter Mydir directory * *
CD-*/* Back to the previous directory */
Cd.. /* Back to the parent directory, with space in the middle * *
CD ~//* 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 tool directory to www directory * *

File actions:
RM Go.tar/* Delete go.tar file * *
Find mt.cgi/* Look for files with file name mt.cgi * *
DF–H/* View disk remaining space, it seems not necessary, unless you are too that

Decompression:
Tar xvf wordpress.tar/* Extract files in tar format * * *
TAR-TVF Myfile.tar/* View the files contained in the tar file * * *

Tar CF Toole.tar Tool/* Package tool directory as Toole.tar file * *
The Tar CFZ vpser.tar.gz tool/* Packs the tool directory and compresses it into vpser.tar.gz files because the. tar file is almost uncompressed, and the Mt. tar.gz file is nearly 10MB after extracting the. tar file.

Tar jcvf/var/bak/www.tar.bz2/var/www//* Create. tar.bz2 file with high compression rate * *
Tar xjf www.tar.bz2/* Decompression tar.bz2 format * *

gzip-d ge.tar.gz/* extract. tar.gz file AS. tar file * *
Unzip Phpbb.zip/* Extract zip file, windows to compress a. tar.gz format file is still a bit of a hassle.

Download:
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 upload all province, the server is not 100M is 1000M bandwidth, download a 2-3 trillion MT is not a few 10 seconds of things * *
Wget-c http://soft.vpser.net/web/nginx/nginx-0.8.0.tar.gz
/* Continue downloading the last file not downloaded * * *

Reprint please indicate the Source: VPS Detective Http://www.vpser.net

Process Management:
Ps-aux/*ps Process Status Query command * *

The meaning of the PS command output field:
[List]
[*] User, the username of the process owner.
[*] PID, the process number, that uniquely identifies the process.
[*]%cpu, the percentage of CPU time and total time taken by the process since the most recent refresh.
[*]%mem, the percentage of memory used by the process.]
[*] VSZ, the virtual memory size used by the process, in K.
[*] RSS, the total amount of physical memory consumed by the process, in K.
[*] TTY, the process-related terminal name.
[*] STAT, process State, use (r--run or prepare to run; s--sleep state; i--idle; z--freeze; d--uninterrupted sleep; W process does not host pages; t stops or tracks. ) These letters to denote.
[*] Start, when the process starts running.
[*] The total CPU time that the process uses.
[*] command, the command-line to be executed.
[/list]

Ps-aux | grep nginx * * In all processes, find the nginx process
Kill 1234/*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 Action:

To move a class:
H/J/K/L: Move left/down/up/Right one grid
W: Backward Word movement (number of words in front plus digits)
B: Forward word movement (number of words in front plus numbers)
E: Move back to the end of the word
GE: Move forward to the end of the word
$ <End>: End of line
0 <Home>: Beginning of line
TX: Find the X of the bank to the right and move there (left in uppercase)
33G: Move to line 33rd of file
GG: First line of file
G: End of File line
33%: 33% of the documents
H/M/L: Top/Middle/last line of the screen
ZT/ZZ/ZB: The current line moves to the top/middle/bottom of the screen

Jump:
": Back to the jump to the place
Ctrl-o: Jump to a "older" place
Ctrl-i <Tab>: Then jump to a "newer" place

Find:
/: Look down (add keyword)
? : Look up (after keyword)
N: Next line of records

Edit:
I: Converting to insert mode
X: Delete Current character
. : Repeat the last modification operation (with PS ctrl+f execution filter)
U: Undo Operation
Ctrl-r: Redo
P: Inserts the deleted character into the current position (put)

Exit Save:
: Q: Exit
: q! : Do not save exit
ZZ: Exit after saving
: e! : Discard changes and edit again

Master these basic commands, Linux under the basic use has been mastered, as long as more practice, encounter problems, solve problems, ability will continue to improve.

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.