Prev Up
Go backward to 4.16 File Protection
Go up to 4 Labs

4.17 Subdirectories

Subdirectories help keep file systems so that files can be located easily. In this lab we look at the UNIX approach to a hierarchical file system.
  1. Use the SHOW DEFAULT command to display your current default directory.
  2. Show the protection of your top-level user directory. Your name may be truncated. Spell it the way it was shown in the last step. (Hint: the username has a maximum of 9 characters.)
    DIRECTORY/PROTECTION [000000]username.DIR
    
  3. Create a sub-directory called SUBDIR in your top level.
    $ CREATE /DIRECTORY [.SUBDIR]
    
  4. Change your default to the newly created directory.
     
    $ SET DEFAULT [.SUBDIR]
    
  5. Copy *.COM from the your top level directory [000000.username] to the new one. If you use the COPY/LOG command the names of the files will be listed as they are copied.
    $ COPY /LOG [-]*.COM *
    
  6. Show all files you copied in with the DIRECTORY command.
  7. Change your default back to your top level.
     
    $ SET DEFAULT [000000.username]
    or
    $ SET DEFAULT [-]            (Same as DOS cd ..)
    
  8. Show all your files in all subdirectories, then list it to a file.
    $ DIR [000000.username...]
    $ DIR/OUTPUT=FILES.LIS [000000.username...] 
    
    (Do NOT forget the three periods. It lists all of the directories in your root directory.)
  9. Delete all the files from the subdirectory.
     
    $ DELETE [000000.username.SUBDIR]*.*;*
    
  10. Set the owner protection of SUBDIR.DIR to RWED and delete it.
     
    $ SET PROTECTION=(O:RWED) SUBDIR.DIR;* 
    $ DELETE SUBDIR.DIR;*
    
Print and turn in the listing FILES.LIS marked with:
Your-Name
Lab : Subdirectories
TABER CSC135
Place the lab in the instructor hand-in box in BUS R6E, the "terminal room".
Instructor: ltaber@pima.edu** My new Home on phRed** The Pima College Site** The Mad Dr. G.'s home page on phred.

Prev Up