Bookmark this page

Quiz: Specify Files by Name

Choose the correct answers to the following questions:

  1. 1.

    Which command returns to your current home directory, assuming that the current working directory is /tmp and your 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 returns you to the working directory before the current working directory?

    A

    cd -

    B

    cd -p

    C

    cd ~

    D

    cd ..

  4. 4.

    Which command changes the working directory up two levels from the current location?

    A

    cd ~/..

    B

    cd ../ ..

    C

    cd ../..

    D

    cd ~/

  5. 5.

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

    A

    llong ~

    B

    ls -a

    C

    ls -l

    D

    ls -al

  6. 6.

    Which command creates an empty file called helloworld.py in the user home directory, assuming that your current directory is /home?

    A

    touch ./helloworld.py

    B

    touch ~/helloworld.py

    C

    touch helloworld.py

    D

    touch ../helloworld.py

  7. 7.

    Which command changes the working directory to the parent of the current location?

    A

    cd ~

    B

    cd ..

    C

    cd ../..

    D

    cd -u1

  8. 8.

    Which command changes 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-9.0-398f302