Common SSH commands in LinuxVPS

Source: Internet
Author: User
Directory operation: rm-rfmydircdmydircd-cd... cd ~ Mvtoolstoolln-stoolbaccp-atool/home/vpser/www file operation: rmgo.tar findmt. cgidf & amp; ndash; h decompression: tarxvfwordpress.tar-tvf...

Directory operation:
Rm-rf mydir
Cd mydir
Cd-
Cd ..
Cd ~
Mv tools tool
Ln-s tool bac
Cp-a tool/home/vpser/www

File operations:
Rm go.tar
Find mt. cgi
Df-h

Decompress:
Tar xvf wordpress.tar
Tar-tvf myfile.tar

Tar cf toole.tar tool
Tar cfz vpser.tar.gz tool

Tar jcvf/var/bak/www.tar.bz2/var/www/
Tar xjf www.tar.bz2

Gzip-d ge.tar.gz
Unzip phpbb.zip

Download:
Wget http://soft.vpser.net/web/nginx/nginx-0.8.0.tar.gz

Http://soft.vpser.net/web/nginx/nginx-0.8.0.tar.gz wget-c


Process Management:
Ps-aux

Description of the ps command output field:
[List]
[*] USER: the USER name of the process owner.
[*] PID, process ID, which uniquely identifies a process.
[*] % CPU, percentage of CPU time and total time occupied by the process since the last refresh.
[*] % MEM, percentage of memory used by the process.
[*] VSZ, virtual memory used by the process, in K.
[*] RSS, total number of physical memory occupied by processes, in K.
[*] TTY, the terminal name related to the process.
[*] STAT, process status, with (R -- run or prepare to run; S -- sleep status; I -- idle; Z -- frozen; D -- uninterrupted sleep; w-the process does not reside on the page; T stops or tracks .) These letters.
[*] START, the process START time.
[*] TIME, total cpu time used by the process.
[*] COMMAND, the COMMAND line to be executed.
[/List]

Ps-aux | grep nginx
Killed 1234
Killall nginx

Vim operation:

Mobile class:
H/j/k/l: move one cell to the left/bottom/up/right
W: move backward words (how many words are added before the number)
B: move the forward word (how many words are added before the number)
E: move backward to the end of the word
Ge: move forward to the end of the word
$ : End of line
0 : Beginning of line
Tx: Search for x in the row to the right and move it there (to the left in uppercase)
33G: move to the 33rd rows of the file
Gg: first line of the file
G: the end of the file.
33%: 33% of the file
H/M/L: the beginning, middle, and end of the screen.
Zt/zz/zb: Move the current row to the beginning/center/bottom of the screen

Jump:
": Return to the Jump Point
CTRL-O: jump to an older place
CTRL-I : Jump to a newer place.

Search:
/: Search down (add a keyword)
? : Search up (followed by a keyword)
N: The Next matched record

Edit:
I: Switch to insert mode
X: delete the current character
.: Repeat the last modification operation (same as ctrl + f in PS to execute the filter)
U: undo operation
CTRL-R: redo
P: Insert the deleted characters to the current position (put)

Exit and save:
: Q: Exit
: Q! : Do not save and exit
ZZ: Save and exit
: E! : Abandon modification and re-edit

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.