Directory Operations:
RM-RF Mydir/* Delete Mydir directory, do not need confirmation, directly delete */
mkdir dirname/* Create a directory named DirName */
CD Mydir/* Enter the Mydir directory */
CD-* * Return to the directory where it was before entering this directory */
Cd.. /* Return to the top-level directory with spaces in the middle */
CD ~/* Back to Current User home 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/* To copy the tool directory to the WWW directory */
LS/* Lists the contents of the current directory */
File operation:
RM Go.tar/* Delete go.tar file */
Find mt.cgi/* Look for files with file name mt.cgi */
DF-H/* View disk remaining space */
Unzip:
Tar xvf wordpress.tar/* Unzip files in tar format */
Tar TVF myfile.tar/* View files that are included in the tar file */
Tar CF Toole.tar Tool/* Package the tool directory as a Toole.tar file */
Tar zcf vpser.tar.gz Tool/* The tool directory is packaged and compressed into a vpser.tar.gz file because. tar files are 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 a high compression rate */
Tar xjf www.tar.bz2/* Unzip the TAR.BZ2 format */
gzip-d ge.tar.gz/* Unzip the. tar.gz file to a. tar file */
Unzip Phpbb.zip/* Unzip the zip file, windows to compress a. tar.gz formatted file 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 the upload is saved, 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 to download files that have not been downloaded last */
Reprint Please specify source: VPS Detective Http://www.vpser.net
Process Management:
Ps-aux/*ps Process Status Query command */
What the PS command output field means:
[List]
[*] User, name of the process owner.
[*] PID, process number, which 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 used by the process.
[*] VSZ, the size of the virtual memory used by the process, in units of K.
[*] RSS, the total number of physical memory that the process occupies, in K.
[*] TTY, process-related terminal name.
[*] STAT, process state, Used (r--run or ready to run; s--sleep state; i--idle; z--frozen; d--uninterrupted sleep; W-process does not have a dwell page; t stops or tracks. ) These letters to indicate.
[*] Start, process start run time.
[*] The total CPU time used by the process.
[*] command that is executed on the line.
[/list]
Ps-aux | grep nginx/* In all processes, look for nginx processes */
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 */
Resource occupancy query:
df-sh/home/wwwroot/*/* View the footprint of each directory under/home/wwwroot/*/
FREE-M/* View memory Core swap usage */
Top/* Check the program's CPU, memory usage */
NETSTAT-NTL/* View Port Usage */
User management:
AddUser/* Add users, such as AddUser Vpser */
Deluser/* Delete user, such as Deluser Vpser */
passwd/* Change password, follow the prompts to enter the password, the password does not display */
Vim operation: Vim Detailed tutorial: http://www.vpser.net/manage/vi.html
To move a class:
H/J/K/L: Left/Bottom/top/right Shift one cell
W: Move Backward Word (number of words before adding numbers)
B: Move the forward word (number of words before adding numbers)
E: Move backwards to the end of the word
GE: Move forward to the end of the word
$ <End>: End of line
0 <Home>: Beginning of the line
TX: Find the bank's X to the right and move to it (left in uppercase)
33G: Move to line 33rd of the file
GG: First line of the file
G: End of File line
33%: 33% Places of the file
H/M/L: First/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 place where the jump came
Ctrl-o: Jump to an "older" place
Ctrl-i <Tab>: Jump to a "newer" place
Find:
/: Look down (add keyword)
? : Look up (add keyword)
N: Next compliant record
Edit:
I: Convert to insert mode
X: Delete the current character
. : Repeat last modification (same as PS ctrl+f execution Filter)
U: Undo Action
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 modification and re-edit
Master these basic commands, the basic use of Linux has mastered, as long as more practice, encounter problems, solve problems, the ability will continue to improve.
Reprint Please specify source: VPS Detective Http://www.vpser.net
Common commands for SSH under the Linux VPS