Lab04: The Unix File System


Objectives

   The goal of this lab is to become proficient with system commands
for viewing the directories and different file types that make up a Unix
filesystem.

Procedure

	To turn in for grading, answer the following questions.  Record your
answers in a text file, one answer per line. When you are done, copy your answers
and paste them into a mail message to: jimg.opus@cabrillo.edu
I will confirm that I have received it.

  1. Write down the absolute path of your home directory.
    /home/cis90/guest     (This would be guest's answer.)
  2. Relative to your home directory, what is the pathname of the tiger file in the Blake subdirectory?
    Poems/Blake/tiger
  3. What command allows you to see hidden files in your current directory?
    ls -a
  4. What command shows the pathname of your current working directory?
    pwd
  5. Are any of your hidden files directories?
    Yes, at least . and .. and maybe .ssh
  6. What does the cd command do when it is invoked with no arguments?
    It makes $HOME your current working directory
  7. Assuming you are in your home directory, what command will change your current working directory to the directory that holds Shakespeare's sonnets?
    cd Poems/Shakespeare   or  cd /home/cis90/guest/Poems/Shakespeare
  8. What is the inode number of the /home/cis90 directory?
    87745
  9. Who is the owner of your home directory?
    You are, $LOGNAME
  10. What's the name of the largest text file in your home directory?
    bigfile  (or possibly mbox)
  11. What's the name and size of the smallest file in your home directory?
    empty  0 bytes
  12. How many subdirectories does the Poems directory have?
    Three:  Blake, Yeats, Shakespeare
  13. What is the first line of the file old in the Poems/Yeats directory?
    When you are old and grey and full of sleep,
  14. What is the last line of sonnet3 in the Shakespeare directory?
    Die single, and thine image dies with thee.
  15. Which files in you home directory should you not view with the cat or more commands?
    Any of your subdirectories, and what_am_i
  16. What key should you type when you want to exit from the more command?
    q
  17. What ls command-line allows you to see the permissions of your home directory, if you are in your home directory?
    ls -ld $HOME
  18. What Unix command will allow you to look at the contents of a data file.
    xxd
  19. Extra Credit: With what command can you list all the hidden files, and only the hidden files of your home directory?
    ls -d .* or   echo .*