ThatQuiz Test Library Take this test now
Command line basics. cd. - Quiz
Contributed by: Iacobelli
  • 1. A directory is equivalent to a
A) Word Document
B) File
C) File System
D) Any document
E) Folder
  • 2. A path is a chain of ______
A) Hard Drives
B) Files
C) Teddy Bears
D) Directories
E) Documents
  • 3. Your home directory is
A) Your home address
B) A special system directory that stores my passwords
C) A default path that looks like a house
D) The default directory to store your files
E) The default directory where programs are
  • 4. the path / stands for
A) Root directory
B) up one level
C) empty path
D) down one level
E) the current directory
  • 5. the path ~ stands for
A) Root directory
B) up one level
C) empty path
D) Home directory
E) down one level
  • 6. if pwd outputs /User/james/test/" you are in what directory?
A) Test under james
B) james under root under test
C) test under root
D) test under james under User
E) User under james under test
  • 7. if pwd outputs /User/jane/programs/output then cd .. will take you to
A) /User/
B) /User/jane/programs/data
C) programs/
D) /User/jane/
E) /User/jane/programs/
  • 8. if pwd outputs /myfiles/modeling/airplanes/biplanes/ then assuming cd ../../data/ succeeds, pwd would now output:
A) /myfiles/modeling/airplanes/biplanes/data
B) /myfiles/modeling/data
C) /myfiles/modeling/
D) /myfiles/modeling/airplanes/biplanes/../
E) /myfiles/data/
  • 9. if pwd outputs "/Dog/Cat/mouse/" what commands should be used to list all the files in Dog/Cat/mouse/flea/?
A) cd flea
B) ls
C) cd flea; ls
D) ls -l
E) pwd flea
  • 10. if pwd outputs "/Dog/Cat/mouse/" what command(s) should be used to list all the files in Dog/Cat/mouse/flea/?
A) cd mouse/flea; ls
B) ls -l
C) ls flea/
D) pwd flea/ ; ls
E) list files flea
  • 11. if pwd outputs "/Dog/Cat/mouse/" and you type ls you will see:
A) a commercial for buger king
B) all the files in the "mouse" directory
C) all the files in the "flea" directory
D) all the files in Dog, Cat and mouse directories
E) the path to the mouse directory
  • 12. if pwd outputs /Dog/Cat/mouse/ and then you issue a cd ~ how do you get back to the original directory?
A) cd /dog/cat/mouse
B) cd /Dog/Cat/mouse
C) cd ~/Dog/Cat/mouse
D) cd dog/cat/mouse
E) cd orig-dir
  • 13. let's say pwd outputs /Users/john/ Now, you have a file /dog/cat/mouse.dat and want to copy it to /dog/cat/rat.dat what command would you issue?
A) cp /Users/john/mouse.dat rat.dat
B) mv /dog/cat/mouse.dat rat.dat
C) cp /dog/cat/mouse.dat rat.dat
D) cp /dog/cat/mouse.dat /dog/cat/rat.dat
E) mv /dog/cat/mouse.dat /dog/cat/rat.dat
  • 14. let's say pwd outputs /dog/cat/ Now, you have a file /dog/cat/mouse.dat and want to copy it to /dog/cat/rat.dat what command would you issue?
A) mv mouse.dat rat.dat
B) mv cp ls pwd
C) mv /dog/cat/mouse.dat /dog/cat/rat.txt
D) cp /dog/cat/mouse /dog/cat/rat
E) cp mouse.dat rat.dat
  • 15. let's say pwd outputs /dog/cat/ Now, you have a file /dog/cat/mouse.dat and want to copy it to /dog/cat/rat.dat what command would you issue?
A) cp /dog/cat/mouse /dog/cat/rat
B) mv /dog/cat/mouse.dat /dog/cat/rat
C) mv mouse.dat rat.dat
D) cp /dog/cat/mouse.dat rat
E) cp /dog/cat/mouse.dat /dog/cat/rat.dat
  • 16. let's say pwd outputs /dog/cat/ Now, you have a file /dog/cat/mouse.dat and want to move it to /dog/cat/rat.dat what command is equivalent to mv mouse.dat rat.dat
A) mv /dog/cat/mouse.dat rat.dat
B) find -space -time -travel
C) cp mouse.dat rat.dat
D) mv mouse.dat rat
E) mv /dog/cat/rat.dat mouse.dat
  • 17. let's say pwd outputs /dog/cat/ Now, you have a file /dog/cat/mouse.dat and want to move it to /dog/cat/rat.dat what command is NOT equivalent to mv mouse.dat rat.dat
A) mv /dog/cat/mouse.dat rat.dat
B) mv mouse.dat /dog/cat/rat.dat
C) mv ../cat/mouse.dat rat.dat
D) mv mouse.dat ../cat/rat.dat
E) mv /dog/cat/mouse.dat /dog/rat.dat
  • 18. let's say pwd outputs /dog/cat/ Now, you have a file /dog/cat/mouse.dat. You type cp mouse.dat rat.dat; cp rat.dat ../mice.dat then:
A) /dog/cat has three files
B) /dog/ has three files, /dog/cat/ has two.
C) /dog/cat has two files, /dog has one file
D) /dog/cat has a file named mouse.dat
E) /dog/cat/mouse.dat has a file called rat.dat
  • 19. let's say pwd outputs /p/g/ Now, you have a file /p/g/out.dat. You type cp out.dat rat.dat; cp rat.dat ../mice.dat; cd ..; mv g/out.dat ." what would ls produce?
A) out with mice and rats!
B) mice.dat
C) out.dat rat.dat mice.dat
D) mice.dat out.dat
E) p g mice.dat out.dat
Created with That Quiz — a math test site for students of all grade levels.