MCQ - Unix Files and Directories

Mar 16, 2015 • Arliss Collins

My MCQ’s are for the lesson “The Unix Shell - Files and Directories” that can be found here

First

If Nelle wanted to count ALL the directories in her current working directory which command should she use … ?

  1. ls -a
  2. ls
  3. ls -F -a
  4. pwd

Second

If the output from the Unix command “pwd” shows /users/nelle/molecules … how can you get to Nelle’s home directory using an absolute path

  1. cd ..
  2. cd users/nelle
  3. cd .
  4. cd /users/nelle

Distortions

  1. this will get you to the right place but it is a relative path
  2. this looks like an absolute path but if forgets the “/” root directory at the beginning
  3. this will not get to the right place and it is a relative path
  4. correct answer