Directory operation: rm-rfmydir * delete the mydir directory * mkdirdirname * create a directory named dirname * cdmydir * and go to the mydir directory * cd-* back to the parent directory * cd, available in the middle & amp; 26684; * cd ~ * Back to the root directory * mv
Directory operation:
Rm-rf mydir/* delete mydir directory */mkdir dirname/* create a directory named dirname */cd mydir/* enter the mydir directory */cd-/* go back to the upper-level directory */ cd .. /* return to the parent directory with spaces in the middle */cd ~ /* Go back to the root directory */mv tools tool/* and rename the tools directory to tool */ln-s tool bac/*. create a symbolic link named bac for the tool directory, the most familiar one is that the FTP www is linked to the public_html directory */cp-a tool/home/vpser/www/* to copy all the files under the tool directory to the www directory */
Directory permission:
When installing the program, you are prompted that you do not have the corresponding file read and write permissions. you must execute the following command at the same time.
Chmod 777-r vm directory/* Permission */chown www: www-r vm directory/* Owner */
File operations:
Rm go.tar/* delete the go.tar file */find mt. cgi/* find the file name mt. check the remaining disk space in the cgi file */df-h/*, unless you are too busy */
Decompress:
Tar xvf wordpress.tar/* decompress the tar format file */tar-tvf myfile.tar/* view the files contained in the tar file */tar cf toole.tar tool/* package the toolcontents into the toole.tar file */tar cfz vpser.tar.gz the tool/* runtime file is almost 10 MB */tar jcvf/var/bak/www.tar.bz2/var/www // * after creating the .tar.bz2 file, high compression rate */tar xjf www.tar.bz2/* decompressed tar.bz2 format */gzip-d ge.tar.gz/* decompressed .tar.gzfile is a .tar file */unzip phpbb.zip/* decompressed file is still a bit troublesome */zip myfile.zip/* compress all files and folders under the current directory into myfile.zip files, -r indicates recursively compressing all files in the subdirectory */unzip
Unzip-o-d/home/sunny myfile.zip/* decompress the myfile.zip file to/home/sunny /*/
-O:/* overwrite the file without prompting ;*/
-D:-d/home/sunny/* indicates to extract the file to the/home/sunny Directory. */others
Zip-d myfile.zip smart.txt/* delete the smart.txt file from the compressed file */
Zip-m myfile.zip./rpm_info.txt/* file rpm_info.txt in myfile.zipto the compressed file */
Download:
Wget users */wget-c http://soft.vpser.net/web/nginx/nginx-0.8.0.tar.gz/* continue to download files not downloaded last time */
Process Management:
Ps-aux/* ps process Status query command */
Description of the ps command output field:
[List] [*] USER: 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/* in all processes, find the nginx process */kill 1234/* 1234 as the process ID, that is, PID */killall nginx/* killall in ps-aux directly kills all processes by program name. nginx is the process name */
Vim operation:
Mobile class:
H/j/k/l: move one cell to the left/down/up/right w: move backward words (how many words are added before the number) B: moving forward words (number of words added before) e: moving backward to the end of the word ge: moving forward to the end of the word $ : 0 at the end of the row : Row first tx: Right search for the Row x and move it there (uppercase to left) 33G: move to the file's 33rd line gg: File's first line G: File's tail line 33%: file 33% H/M/L: the first/middle/tail line of the screen zt/zz/zb: The current line moves to the first/middle/bottom of the screen
Jump:
": Back to the jump to the place CTRL-O: jump to a older place CTRL-I : Jump to a newer place.
Search:
/: Search down (add a keyword )? : Search up (followed by a keyword) n: next matched record
Edit:
I: convert to insert mode x: delete the current character.: repeat the last modification operation (with ctrl + f executing filter in PS) u: undo operation CTRL-R: redo p: Insert the deleted character to the current position (put)
Exit and save:
: Q: Exit: q! : Do not save exit ZZ: Save and exit: e! : Abandon modification and re-edit
You have mastered these basic commands and basic usage in Linux. as long as you practice more and encounter more problems and solve problems, your abilities will be continuously improved.