โ† All Linux Flashcard Decks

File System Navigation Flashcards

7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 File System Navigation flashcards as text
  1. Which command finds all files named `config.txt` starting from the root directory?

    Answer: find / -name config.txt

    `find / -name config.txt` recursively searches from `/` for files exactly matching that name.

  2. What does the `realpath` command return?

    Answer: The resolved absolute path with all symlinks expanded

    `realpath` canonicalizes a path by resolving all symbolic links and `.` / `..` components.

  3. Which directory stores temporary files that are cleared on reboot on systemd-based systems?

    Answer: /tmp

    On systemd systems, `/tmp` is typically a tmpfs mount cleared at boot, unlike `/var/tmp` which persists.

  4. What output does `ls -la /` show that `ls -l /` does not?

    Answer: Hidden entries like `.` and `..`

    The `-a` flag includes entries starting with `.`, such as the `.` (current) and `..` (parent) directory entries.

  5. Which command would you use to navigate directly to `/etc/nginx/conf.d` regardless of where you currently are?

    Answer: cd /etc/nginx/conf.d

    An absolute path starting with `/` navigates directly from root regardless of the current directory.

  6. What does `ls -i` display alongside file names?

    Answer: Inode numbers

    The `-i` flag makes `ls` print the inode number of each file before its name.

  7. Which command shows disk usage of each subdirectory one level deep inside `/home`?

    Answer: du -h --max-depth=1 /home

    `du -h --max-depth=1 /home` reports human-readable disk usage for each immediate subdirectory of `/home`.