1. Display the file directory command ls (DOS is DIR)
2. Change the current directory command CD (DOS CD)
PWD Shows the current directory
3. Create a subdirectory MKDir (MD or MKDIR under DOS)
4. Delete subdirectory command RMDir (DOS is RD)
5. Delete the file command RM (DOS is DEL or EARSE)
6. File Renname Command MV (REN or RENAME under DOS) Use the mv command in Linux to rename, for example:
MV / MNT / FLOPPY P is equivalent to REN / MNT / FLOPPY P
Note: The MV command in Linux except for file renons, there is a function of file movement, examples:
MV / MNT / FLOPPY / BIN is equivalent to command MOVE / MNT / FLOPPY / BIN in DOS
7. Document copy command CP (DOS is COPY)
Example: CP / UCDOS / * / FOX is equivalent to copy /ucdos/*.* / fox
Note: *. * In Linux is replaced in linux.
8. Get the help information command Man (DOS is HELP)
9. Show the contents of the file Less (Type under DOS)
In Linux, use the LESS command to display the file, for example, we want to display the contents of MWM.LX under the Man1 subdirectory, just enter: [root @ localhost man1] #less mwm.lx. In Linux, we can also display file content with another command "more", for example: more mwm.lx. You will see that these two commands are very similar, in fact, the functionality of the Less command is better than more, you can explore yourself. In Linux, there is also a command to read the reading files in DOS, which are the head and tail commands, which are used to display some of the heads and rear parts of the file. Using the format: Head (tail) [m], when default N, 10 lines are displayed, for example:
Head /usr/man/mwm.lx display the contents of the top 10 lines of the file MWM.LX
Head 15 /usr/man/mwm.lx Displays the contents of the first 15 lines of the file MWM.LX
Tail 17 /usr/man/mwm.lx Displays the contents of 17 lines after the file MWM.LX
10. Redirect and pipeline
Everyone knows that in DOS, we can easily make some special operations with the pipeline, such as: Dir> Direct to put the current directory into the file direct; Type Readme >> Direct, append the contents of the file readme to the file Direct; Another example: Type Readme.txt More, page display text file readme.txt content. The redirection in Linux is almost the same as the operation in DOS. The above two examples should be in Linux: LS> Direct; Less Readme.txt More (Note: In fact, the more and less command itself in Linux Have a paging function).
11. Shell: Command Interpreter (Command)
In the DOS system, most users are using a command intermand.com command interpreter. Of course, you can also exchange Dosshell after Norton or DOS4.0. In Linux, there are several shells. Common: ASH, BASH, KSH, TCSH, ZSH, etc., from the above environment variables shell = / bin / bash can see which shell you use, where it is. Computer default is generally BASH
12. Install the RPM file
Installation: rpm -ivh rpm file full circuit
Delete: RPM-E RPM file name (excluding version and extension)
Find: rpm -q rpm file name
13. Unzip TAR files
TAR XVF TAR file
14. Decompress Tar.gz file
Gunzip Or Tar Zxvf tar.gz file 15. Find files in the specified path Find specified path - Name file name 16. Create a connection LN -S directory full road connection name 17. View the specified process PS AUX | GREP Specified Process 18. View network status Netstat -nat 19. Switch the user SU - Username 20. Change the directory owner (including subdirectory) Chown -R Group: User Directory Name 21. Change the file to executable CHMOD X file name 22.vi common command ESC: command Q: Exit WQ: storage exit Q !: Do not save, forcibly exit ESC command I: Insert before the current characters A: Addition after the current character o: Insert the line after the current line X: Delete the current character DD: Delete the current line / key: Find the keyword, press N to find the next one