Modern QA2026Exercises
Log inJoin
1 / 2 · Book 19 · The Linux Directory Structure · drill: interview Q&A⊞ allnext →Get the book →

1.6Exercises

Beginner

  1. Open a terminal and run pwd to see your current directory. Then navigate to /var/log/ and list the files. Identify which logs belong to which service.
  2. Navigate to your home directory and list all files, including hidden ones (ls -la). Identify the dotfiles (files starting with .) and guess what each one is for.
  3. Create the following directory structure using a single mkdir -p command: ~/qa-practice/tests/unit/, ~/qa-practice/tests/integration/, ~/qa-practice/tests/e2e/.

Intermediate

  1. Find all .log files modified in the last 24 hours anywhere on the system using find.
  2. Check disk usage on your machine with df -h. Which filesystem is the fullest? Use du -h --max-depth=1 on a large directory to find what is taking up space.
  3. Create a file in /tmp/, verify it exists, reboot your machine (or wait until the next reboot), and check if the file still exists. Explain why.

Advanced

  1. Use tail -f to monitor a log file in real-time while performing an action that generates log entries in another terminal window.
  2. Write a command that finds the 10 largest files anywhere on the system and displays their sizes in human-readable format.
  3. Use find to locate all files larger than 50MB that have not been accessed in the last 30 days. Consider how this could be used for disk cleanup on CI runners.