Comparison of common DOS and Linux commands
Many of the Linux commands you type at the shell prompt are similar to the commands you type under DOS. In fact, some commands are exactly the same.
This appendix provides common commands for Windows with DOS prompts and commands that are equivalent to them in Linux. The appendix also provides a simple example of how to use these commands at the Linux shell prompt. Note that these commands often have many options, and to learn more about each command, read the relevant manual (man) page (for example, type man ls at the shell prompt to read information about the ls command). http://hovertree.com/menu/linux/
purpose of the order |
MS-DOS |
Linux |
A simple example of Linux |
Copying files |
Copy |
Cp |
CP thisfile.txt /home/thisdirectory |
Transferring files |
Move |
Mv |
MV thisfile.txt /home/thisdirectory |
Enumerating files |
Dir |
Ls |
Ls |
Clear Screen |
Cls |
Clear |
Clear |
Turn off shell hints |
Exit |
Exit |
Exit |
Show or set date |
Date |
Date |
Date |
deleting files |
Del |
Rm |
RM Thisfile.txt |
"echo" the output to the screen. |
Echo |
Echo |
echo this message |
To edit a file with a simple text editor |
Edit |
gedit ([a]) |
Gedit thisfile.txt |
Compare file Contents |
Fc |
Diff |
Diff File1 file2 |
Find a string in a file |
Find |
Grep |
grep Word or phrase Thisfile.txt |
Format floppy disk |
format A:(if the floppy disk is in a: ) |
mke2fs or mformat([b]) |
/sbin/mke2fs/dev/fd0(/dev/fd0 is Linux with a: equivalent drive) |
Show Command Help |
command /? |
Man ([C]) |
Man Command |
Create a Directory |
Mkdir |
Mkdir |
mkdir Directory |
View Files |
More |
Less ([d]) |
Less thisfile.txt |
Renaming files |
ren |
MV([E]) |
MV thisfile.txt thatfile.txt |
Show your location in the file system |
ChDir |
Pwd |
Pwd |
Use the specified path ( absolute path, absolutepath) to change the directory |
CD path name |
CD path name |
CD /directory/directory |
Use a relative path (relative path) to change the directory |
Cd.. |
Cd.. |
Cd.. |
Show time |
Time |
Date |
Date |
Shows the amount of memory that has been used |
Mem |
Free |
Free |
Note: A. Gedit is a graphical text editor, and you can use other text editors instead of Gedit, including Emacs and VI. B. This command formats the floppy disk for the DOS file system. C. You can also use infofor some commands. D. The more paging device can also be used one screen at a screen to view pages in a file. The E. mv command can transfer files or rename files in the same directory. If you want to rename the file, as shown in the example, "transfer" the file to a new name in the same directory. |
Recommendation: http://www.cnblogs.com/roucheng/p/3470287.html
Comparison of common DOS and Linux commands