Chapter 3: Files and directories
Linux files and directories quiz
Twelve questions across the whole chapter. Each answer explains why. Aim for nine before moving on to chapter 4.
- Which directory holds data that grows while the system runs and must survive a reboot, such as logs and databases?
- Which of these is an absolute path?
- You are in /etc/ssh. Where does cd ../../var take you?
- Which command lists the hidden files in your home directory as well as the others?
- backup is an existing directory. What does mv config.yml backup do?
- Which command copies the directory site, with everything in it, to site-old?
- You run rmdir build and get "Directory not empty". What does that tell you?
- How many hard links does a file have if ls -l shows a link count of 1?
- Which can a symbolic link do that a hard link cannot?
- current is a symbolic link to the directory release/v1. Which command repoints it to release/v2?
- What does touch log-{mon,tue,wed}.txt create?
- Which line prints "Cost: $5 per user" exactly?