Assessment: Files and Directories in Unix Shell

Oct 2, 2014 • Fatma Imamoglu

1) You want to find out in which directory you are currently in. Which of the following commands would you use (Note: The dollar sign ‘$’ (prompt) at each line indicates that the shell is ready to run a command’):

(a) $ whereami
(b) $ whoami
(c) $ pwd
(d) $ ls

2) Select the correct statement :

(a) The command  $ cd   ** brings you back to the directory you were previously in
(b) The command  
$ cd /** brings you to your home directory
(c) The command  $ cd   brings you to your home directory
(d) The command  $ cd   does not change anything and the prompt is back