Dr. Mark Humphrys

School of Computing. Dublin City University.

Online coding site: Ancient Brain

 

Search:


Linux Quiz 1



  
When I say "Type X followed by Y" I mean you type X, then hit return, then type Y, then hit return.
  

cd and directories

  1. Typing "pwd" does what?
  2. Typing "cd" does what?
  3. Typing "cd" followed by "pwd" does what?
  4. Typing "cd" followed by "cd .." does what?
  5. Typing "cd" followed by "cd .." followed by "pwd" does what?
  6. Typing "cd" followed by "mkdir stuff" does what?
  7. Do it again. What happens? Why?
  8. Typing "cd" followed by "mkdir ../stuff" does what? Why?

Relative and absolute addressing

  1. I am in my home directory and I type: cd public_html - What directory am I in now?
  2. I am in my home directory and I type: cd /bin - What directory am I in now?
  3. I am in my home directory and I type: cd bin - What directory am I in now?
  4. I am in my home directory and I type: cd ../bin - What happens? Why?

system directories

  1. Typing "cd /" causes what to happen?
  2. Typing "cd /" followed by "cd .." causes what to happen?
  3. The commands "cd /" followed by "mkdir stuff" are run, what happens?
  4. Typing "cd \" causes what to happen? (Advanced question.)
  5. What is the directory /bin for?
  6. How do you list the files in /bin?
  7. Write a command line to count the number of files in /bin (Advanced question.)

ls

  1. The command ls -l does what?
  2. The command ls -a does what?
  3. The command ls -R does what?
  4. The command ls -d does what?
  5. Write a command line to check whether /bin is actually a shortcut to a different location. (Advanced question.)
  


If you submit by mistake or make an error, just press "Back" and submit again.