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
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.
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.
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.
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.
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.
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.
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`.