SSH common commands under Linux VPS

  
 

Directory operation rm -rf mydir # Delete mydir directory mkdir dirname /*Create directory named dirname */cd mydir /*Enter mydir directory */cd - /* Back to the previous directory */cd .. /* Back to the parent directory with spaces */cd ~ /* back to the root directory */mv tools tool /* rename the tools directory to tool */ln -s tool bac /* to create a symbolic link named bac for the tool directory, most Familiar should be FTP link www to the public_html directory * /cp -a tool /home /vpser /www /* copy all files in the tool directory to the www directory * /

file operation rm go. Tar /* Delete the go.tar file */find mt.cgi /* Find the file named mt.cgi */df –h /* Check the remaining space on the disk, it seems that there is no need, unless you are too much */

Unzip tar xvf wordpress.tar /* Unzip the tar file */tar -tvf myfile.tar /* View the files contained in the tar file */tar cf toole.tar tool /* Tool directory Packaged as toole.tar file */tar cfz vpser.tar.gz tool /* Package and compress the tool directory to vpser.tar.gz file, because the .tar file is almost uncompressed, MT's .tar.gz file Decompression After the .tar file is almost 10MB */tar jcvf /var/bak/www.tar.bz2 /var/www//*Create a .tar.bz2 file with a high compression ratio*/tar xjf www.tar.bz2 /*Unzip Tar.bz2 format */gzip -d ge.tar.gz /* Unzip the .tar.gz file as a .tar file */unzip phpbb.zip /* Unzip the zip file, and compress a .tar.gz file in windows The file is still a little troublesome*/

Download wget http://download.yutian.org/readme.txt/*Download the files on the remote server to your own server, even the upload is saved, the server is not 100M Is 1000M bandwidth, downloading a 2-3 trillion MT is not a few tens of seconds */wget -c http://download.yutian.org/readme.txt /* Continue to download the last undownloaded file* /

Process Management ps -aux /*ps Process Status Query Command */ps Command Output Field Meaning: USER, the process owner's username. PID, process number, can uniquely identify the process. %CPU, the percentage of CPU time and total time taken by the process since the last refresh. %MEM, the percentage of memory used by the process. VSZ, the amount of virtual memory used by the process, in K. RSS, the total amount of physical memory occupied by the process, in K. TTY, the process-related terminal name. STAT, process state, use (R--run or ready to run; S--sleep state; I--idle; Z--freeze; D--stop sleep; W-process has no resident page; T stops or tracks .) These letters are used to indicate. START, the process starts running time. TIME, the total CPU time used by the process. COMMAND, the command line to be executed. Ps -aux

Copyright © Windows knowledge All Rights Reserved