Complete Latest 2025/2026 with
Correct Answers and Rationales
GRADED A+
What Bash command counts the number of Python files in the current directory?
<Ans> ls *.py | wc -l
What does echo $((3 + 2 * 4)) output?
<Ans> 11 - Bash evaluates arithmetic expressions inside $(( ))
You get Permission denied trying to run ./script. How do you fix it?
<Ans> chmod +x script - adds execute permissions.
What does head -n 5 data.txt | tail -n 2 show?
<Ans> Lines 4 and 5 of data.txt
What command redirects both stdout and stderr to log.txt, overwriting it?