Assessment: The Unix Shell --- Files and Directories

Oct 1, 2014 • Emilia Gan

1. Imagine your working directory has the following absolute path:

/users/nelle/thesis

You want to move to the parent directory of your current working directory. The SIMPLEST way to accomplish this would be to:

    a. Use the command “cd nelle” to switch to the directory named nelle

    b. use the command “cd /” to switch to the root directory

    c. use the absolute path for the directory you want to move to

    d. use the command “cd ..” to move up one level in the file system

    e. use the command “cd  /users” to switch to the directory named users

   

 2. Answer the questions below given the absolute path to the nelle directory: /users/nelle and the information that the command “ls -F” produces the following output:

creatures/  molecules/           pizza.cfg         thesis/
data/       north-pacific-gyre/  solar.pdf
Desktop/    notes.txt            writing/

  1. The ________ directory is a subdirectory of nelle.
  2. If you are in the data directory, provide a command to switch to the writing directory:________________________
  3. Why can’t you use the cd command to access notes.txt? ____________
  4. How can you check to make sure that you are seeing ALL the subdirectories contained within the nelle directory? ______________________
  5. What command could you use if you were unsure where you were in the file system? ____________________________