Question 6 — AZ-104 Practice Exam 6
For each Bash command, drag it to the correct description.
Each item may be used once, more than once, or not at all.
| Option | Correct Match |
|---|---|
| Lists contents of a directory | [Gap 1] |
| Displays the contents of a file | [Gap 2] |
| Runs a command with elevated privileges | [Gap 3] |
| Removes a file or directory | [Gap 4] |
| Copies a file or directory | [Gap 5] |
| Shows currently running processes | [Gap 6] |
- sudo
- cp
- Ubuntu
- ls
- cat
- ps
- rm
- gifs
Correct answers
- Gap 1: ls
- Gap 2: cat
- Gap 3: sudo
- Gap 4: rm
- Gap 5: cp
- Gap 6: ps
Explanations
Correct Matches
ls – Lists contents of a directory, optionally with flags like -a or -l.
cat – Displays the contents of a file, typically plain text.
sudo – Runs a command with root-level privileges temporarily.
rm – Removes files or directories, often used with flags like -r or -i.
cp – Copies files or directories, with options for recursion and interaction.
ps – Shows active processes, with flags like -e or -ef for detail.
Unused Item(s)
gifs – This is just a sample subdirectory, not a command.
Ubuntu – This is an operating system distribution, not a Bash command.