Comparison of common DOS and Linux commands, common linux commands
Comparison of common DOS and Linux commands
Many Linux commands typed at the shell prompt are similar to those you typed in DOS. In fact, some commands are identical.
This appendix provides common commands for Windows DOS prompts and commands 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 usually have many options. To learn more about each command, read the relevant manual (man) page (for example, enterMan lsYou can read aboutLsCommand Information ). Http://hovertree.com/menu/linux/
Command Purpose |
MS-DOS |
Linux |
Simple Linux instance |
Copy a file |
Copy |
Cp |
CpThisfile.txt/Home/Thisdirectory |
Transfer File |
Move |
Mv |
MvThisfile.txt/Home/Thisdirectory |
List objects |
Dir |
Ls |
Ls |
Clear Screen |
Cls |
Clear |
Clear |
Shell close prompt |
Exit |
Exit |
Exit |
Display or set date |
Date |
Date |
Date |
Delete an object |
Del |
Rm |
RmThisfile.txt |
Echo the output to the screen |
Echo |
Echo |
EchoThis message |
Use a simple text editor to edit files |
Edit |
Gedit([A]) |
GeditThisfile.txt |
Compare file content |
Fc |
Diff |
DiffFile1 File2 |
Search for strings in files |
Find |
Grep |
GrepWord or phrase Thisfile.txt |
Format a floppy disk |
Format:(If the floppy disk isA:Medium) |
Mke2fsOrMformat([B]) |
/Sbin/mke2fs/dev/fd0(/Dev/fd0In LinuxA:Equivalent drive) |
Show Command help |
Command/? |
Man([C]) |
ManCommand |
Create directory |
Mkdir |
Mkdir |
MkdirDirectory |
View files |
More |
Less([D]) |
LessThisfile.txt |
Rename a file |
Ren |
Mv([E]) |
MvThisfile.txt Thatfile.txt |
Show your location in the file system |
Chdir |
Pwd |
Pwd |
Use the specified path (Absolute path, absolute path) To change the Directory |
CdPath Name |
CdPath Name |
Cd/Directory |
Use oneRelative path)To change the Directory |
Cd .. |
Cd .. |
Cd .. |
Display time |
Time |
Date |
Date |
Displays the number of memory in use. |
Mem |
Free |
Free |
Note: A. Gedit is a graphical text editor, which can be replaced by other text editors.Gedit, IncludingEmacsAndVi. B. This command is used to format a floppy disk in the DOS file system. C. You can also use some commandsInfo. D.MoreThe page splitter can also be used to view objects page by page on a screen. E.MvCommand to 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. |
Recommended: http://www.cnblogs.com/roucheng/p/3470287.html