Contact Us

NSIT Support Line
4-TECH (773-834-8324)
support@uchicago.edu
Current Hours

Documentation - Operating Systems

Comparing basic Unix, DOS, Mac commands

Many of the operations that you do with files on a computer are similar no matter what computer or operating system you are using. If you are learning a new operating system, and you already know how to manipulate files and directories using another kind of system, then you simply need to learn the commands for those operations in the new system. The table below shows equivalent commands in Unix, MS-DOS and the Macintosh Finder.

Operation

Unix command

DOS command

Macintosh action

list files

ls

Dir

 

show disk or show detailed

ls -l filename

dir filename

select icon and info about a particular file choose Get Info from File menu

show contents of

cat, more, less type, more

 

(not built in to file Finder; open file in application and scroll text)

copy file

cp

copy

drag icon to another disk; or select icon and choose Duplicate from File menu

move file

mv

rename, ren

drag icon to another folder or window

rename file

mv

rename, ren

click on icon name, then edit or retype

delete file

rm

delete, del,

erase drag file icon to Trash

compare contents

diff

comp

(not built in to of two files Finder)

change directories

cd

chdir, cd

select or open window of desired folder

show current

pwd

cd (with no read name in directory arguments)

title bar of active window

create directory

mkdir

mkdir, md

choose New Folder from File menu

delete directory

rmdir

rmdir, rd

drag folder icon to Trash


Go to Appendix B: Intermediate command reference or return to Unix Tutorial Table of Contents

Last updated: 7/15/08