Skip to main content

A Comparison of Common DOS and Linux Commands

Many Linux commands typed at a shell prompt are similar to the commands you would type in MS-DOS. In fact, some commands are identical.
This appendix provides common commands used at the MS-DOS prompt in Windows 9x and their counterparts in Linux. Basic examples of how the command are used at the Linux shell prompt are also provided. Note that these commands usually have a number of options. To learn more about each command, read its associated man page (for example, type man ls at the shell prompt to read about the ls command).
Table B-1. Similar Commands
Command's PurposeMS-DOSLinuxBasic Linux Example
Copies filescopycpcp thisfile.txt /home/thisdirectory
Moves filesmovemvmv thisfile.txt /home/thisdirectory
Lists filesdirlsls
Clears screenclsclearclear
Closes prompt windowexitexitexit
Displays or sets datedatedatedate
Deletes filesdelrmrm thisfile.txt
"Echoes" output on the screenechoechoecho this message
Edits files with simple text editoreditpico[a]pico thisfile.txt
Compares the contents of filesfcdiffdiff file1 file2
Finds a string of text in a filefindgrepgrep this word or phrase thisfile.txt
Formats a disketteformat a: (if diskette is in A:)mke2fs (or mformat[b])/sbin/mke2fs /dev/fd0 (/dev/fd0 is the Linux equivalent of A:)
Displays command helpcommand /?man[c]man command
Creates a directorymkdirmkdirmkdir directory
View a filemoreless[d]less thisfile.txt
Renames a filerenmvmv thisfile.txt thatfile.txt[e]
Displays your location in the file systemchdirpwdpwd
Changes directories with a specified path (absolute path)cd pathnamecd pathnamecd /directory/directory
Changes directories with a relative pathcd ..cd ..cd ..
Displays the timetimedatedate
Shows amount of RAM and usememfreefree
Notes:
a. Pico is a simple text editor; other editors you can use in place of Pico include Emacs and vi.
b. This formats a disk for the DOS filesystem.
c. You can also use info for some commands.
d. The more pager can also be used to page through a file a screen at a time.
e. The mv command can both move a file and, if you want to rename a file in the same directory, you "move" that file to the same directory with a new name, as in this example.

Comments

Popular posts from this blog

Computer Buses

Computer Buses   A computer system consists of different devices.CPU must be able to communicate with all devices. The devices are connected together by a communications channel called bus. A bus consists of a set of communication lines or wires. It is used to move a large amount of bits in the form of electrical pulses from one unit to another. The bus is used to connect the following units: Central Processing Unit Control Unit  Arithmetic and Logic Unit Main Memory ( RAM, ROM) Input / Output Devices Bus is a common path to transfer data and commands between CPU, memory and input / output devices.It is also used to send or receive data from secondary storage.The capacity of a bus depends on the number of data lines in it.A bus with 16 lines can carry 16 bits or 2 bytes at a time. A bus with 32 lines can carry 32 bits or 4 bytes at a time . Types Of  Buses Different types of buses are as follows: 1. Data Bus 2.Addres...

Steps of splitting pdf files

Goto https://www.ilovepdf.com/split_pdf Click on Select PDF File. Upload your pdf file here. Select Extract Pages from right menu. Click on Split pdf button and wait for the procedure. Now Click on Download Split PDF and you will get a zip file in which there will be separate pdf.

Steps to remove google accounts from Computer

Open Google . You will see a round shaped picture of google account picture in top right corner as marked in below picture Click on it. Click on sign out of all accounts Click on Sign In at the top right corner as shown in picture below. Click on it. You will see following screen. Select your desired account from it and sign in . Reopen your form by clicking link provided to you, It will be open now.