Bookmark this page

Quiz: Specifying Files by Name

Choose the correct answers to the following questions:

  1. 1.

    Which command is used to return to the current user's home directory, assuming the current working directory is /tmp and their home directory is /home/user?

    A

    cd

    B

    cd ..

    C

    cd .

    D

    cd *

    E

    cd /home

  2. 2.

    Which command displays the absolute path name of the current location?

    A

    cd

    B

    pwd

    C

    ls ~

    D

    ls -d

  3. 3.

    Which command will always return you to the working directory used prior to the current working directory?

    A

    cd -

    B

    cd -p

    C

    cd ~

    D

    cd ..

  4. 4.

    Which command will always change the working directory up two levels from the current location?

    A

    cd ~

    B

    cd ../

    C

    cd ../..

    D

    cd -u2

  5. 5.

    Which command lists files in the current location, using a long format, and including hidden files?

    A

    llong ~

    B

    ls -a

    C

    ls -l

    D

    ls -al

  6. 6.

    Which command will always change the working directory to /bin?

    A

    cd bin

    B

    cd /bin

    C

    cd ~bin

    D

    cd -bin

  7. 7.

    Which command will always change the working directory to the parent of the current location?

    A

    cd ~

    B

    cd ..

    C

    cd ../..

    D

    cd -u1

  8. 8.

    Which command will change the working directory to /tmp if the current working directory is /home/student?

    A

    cd tmp

    B

    cd ..

    C

    cd ../../tmp

    D

    cd ~tmp

Revision: rh124-8.2-df5a585