Comparison of common dos and Linux commands

Source: Internet
Author: User

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 ).

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.

 

Conversion from: Red Hat Linux 9: Red Hat Linux Getting Started Guide

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.