next up previous contents
Next: Putting Theory into Practice Up: File Basics Previous: Directories   Contents

Basic UNIX and DOS Commands

In the discussion on directories above the UNIX directory format was chosen to illustrate the ideas. Other computers use different formats. In this section there is a table of basic file operations and directory formats for two types of computer system: UNIX and DOS. More will be said about DOS later. In the table, f, f1 and f2 stand for file names.

Operation UNIX DOS
Edit File vi f ED f
Directory ls f DIR f
Type (screen) cat f TYPE f
Print (hardcopy) lpr f PRINT f
Copy f1 to f2 cp f1 f2 COPY f1 f2
Rename f1 to f2 mv f1 f2 REN f1 f2
Delete rm DEL
Absolute Directories /smith/sno/ $\backslash$SMITH$\backslash$SNO$\backslash$
Relative Directories current/ ../pdk/ CURRENT$\backslash$ ..$\backslash$PDK$\backslash$
Create Directory mkdir sno MD SNO
Delete Directory rmdir sno RD SNO
As can be seen from this table, DOS directories and UNIX directories are very similar.


next up previous contents
Next: Putting Theory into Practice Up: File Basics Previous: Directories   Contents
P.D. Gronbech (IT Staff) 2015-10-02