UNIX for Windows Users
January 14th, 2006
Credit: This handy list originally appeared on the UnixWare web site in their article, “DOS command equivalents,” and is reproduced here for private use only.
The following is a list of Windows DOS commands and their Unix equivalents:
| DOS command (A-M) | What it does | UNIX system equivalent | Notes |
|---|---|---|---|
| cd | change directories | cd(1) | Â |
| cls | clear the screen | clear(1) | Â |
| copy | copy files | cp(1), tar(1) | Use cp to copy files and tar to copy files or directories onto floppy disks or tapes. |
| date | display the system date and time | date(1), cal(1) | On the UNIX system, date displays the date and the time. cal displays the date, the time, and a 3-month calendar. |
| del | delete a file | rm(1) | Be careful when using rm with wildcard characters, like rm . |
| dir | list the contents of a directory | ls(1) | There are a variety of options to ls including ls -l to see a long listing and ls -f to see a listing that indicates file types. |
| edlin | line editor | ed(1), ex(1), vi(1) | vi is a full-screen text editor with powerful search and replace functions. ed and ex are predecessors of vi. |
| fc | compare two files | diff(1), diff3(1), cmp(1) | diff compares two text files. diff3 compares three text files. Use cmp to compare binary files. |
| find | find text within a file | grep(1) | grep (global regular expression parser) finds text within a file. The UNIX system’s find(1) command finds files. |
| format | format a disk | format(1M) | See /etc/default/format for the default drive to format. The format command formats a disk for use with UNIX system files. |
| mkdir | make a directory | mkdir(1) | Â |
| more | display output one screen at a time | more(1) | Â |
| print files in the background | lp(1) | Use lp filename & to print in the background. You can run any UNIX system command in the background by adding & (ampersand) to the end of the command line. |
|
| ren | rename a file | mv(1) | Â |
| rmdir | remove an empty directory | rmdir(1) | Use rm -r to remove a directory that is not empty. |
| sort | sort data | sort(1) | Â |
| type | display a text file | cat(1), more(1) | Â |
| xcopy | copy directories | tar(1) | Use tar if you want to copy directories onto disk or tape. |


.