C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
A Comparison of Common DOS and Linux Commands
 

Appendix C. A Comparison of Common DOS and Linux Commands

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

Command's PurposeMS-DOSLinuxBasic Linux Example
Copies filescopycpcp thisfile.txt /home/thisdirectory
Moves filesmovemvmv thisfile.txt /home/thisdirectory
Lists filesdirlsls
Clears screenclsclearclear
Closes shell promptexitexitexit
Displays or sets datedatedatedate
Deletes filesdelrmrm thisfile.txt
"Echoes" output to the screenechoechoecho this message
Edits files with simple text editoreditgedit([a])gedit 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
Views a filemoreless([d])less thisfile.txt
Renames a filerenmv([e])mv thisfile.txt thatfile.txt
Displays your location in the file systemchdirpwdpwd
absolute path)cd pathnamecd pathnamecd /directory/directory
Changes directories with a relative pathcd ..cd ..cd ..
Displays the timetimedatedate
Shows amount of RAM in usememfreefree
Notes:
a. Gedit include Emacs and vi.
b. This formats a disk for the DOS file system.
c. You can also use info for some commands.
d. The more
e. The mv

Table C-1. Similar Commands

Главная