UNIX system concepts for DOS programmers

Common command equivalents

The command sets of the DOS and UNIX systems has similarities and differences. The following table lists some of the more common DOS commands with their UNIX equivalents. For details on the UNIX commands, see section C of the manual pages or use the man command. For example, the man pwd command will display the manual page for the pwd(C) command.

DOS command UNIX command Function
cd (no arguments) pwd print current directory
cd dir, chdir dir cd dir change directory to dir
cls clear clear screen
comp diff compare files
copy cp copy file
del, erase rm remove file
dir ls list directory contents
find grep search file for pattern
mkdir, md mkdir make new directory
more more display file screen-by-screen
print lp print file on printer device
ren, rename mv rename (move) file
rmdir, rd rmdir remove directory
sort sort sort file
type cat display file contents
undelete -- restore deleted file
* * wild card (match zero or more characters)
? ? wild card (match any one character)
. . current directory
.. .. directory above current directory
cmd > file cmd > file redirect output of cmd to file
cmd >> file cmd >> file append input of cmd to file
cmd < file cmd < file use file as input to cmd to
cmd1 | cmd2 cmd1 | cmd2 send output of cmd1 to cmd2

© 2005 The SCO Group, Inc. All rights reserved.