1. What does grep -r 'ERROR' /var/log do? Junior A. recursively search files under /var/log for lines containing ERROR B. make the deploy.sh script executable C. edit the file in place, replacing every dev with prod D. list all processes and filter for those running python Reveal the answer + AI explanation — free account
2. Which command will recursively search files under /var/log for lines containing ERROR? Junior A. grep -r 'ERROR' /var/log B. curl -fsS https://api/health C. tail -f /var/log/app.log D. awk '{print $1}' access.log Reveal the answer + AI explanation — free account
3. Which statement is correct? Junior A. grep -r 'ERROR' /var/log — recursively search files under /var/log for lines containing ERROR B. grep -r 'ERROR' /var/log — edit the file in place, replacing every dev with prod C. grep -r 'ERROR' /var/log — make a Bash script exit on error, unset variables and failed pipe stages D. grep -r 'ERROR' /var/log — make the deploy.sh script executable Reveal the answer + AI explanation — free account
4. What does chmod +x deploy.sh do? Junior A. make the deploy.sh script executable B. edit the file in place, replacing every dev with prod C. print the first whitespace-delimited field of each line D. recursively search files under /var/log for lines containing ERROR Reveal the answer + AI explanation — free account
5. Which command will make the deploy.sh script executable? Junior A. ps aux | grep python B. chmod +x deploy.sh C. xargs -n1 -P4 D. curl -fsS https://api/health Reveal the answer + AI explanation — free account
6. Which statement is correct? Junior A. chmod +x deploy.sh — print the first whitespace-delimited field of each line B. chmod +x deploy.sh — edit the file in place, replacing every dev with prod C. chmod +x deploy.sh — make a Bash script exit on error, unset variables and failed pipe stages D. chmod +x deploy.sh — make the deploy.sh script executable Reveal the answer + AI explanation — free account
7. What does ps aux | grep python do? Junior A. make a Bash script exit on error, unset variables and failed pipe stages B. stream new lines appended to the log file in real time C. edit the file in place, replacing every dev with prod D. list all processes and filter for those running python Reveal the answer + AI explanation — free account
8. Which command will list all processes and filter for those running python? Junior A. sed -i 's/dev/prod/g' config.ini B. ps aux | grep python C. curl -fsS https://api/health D. tail -f /var/log/app.log Reveal the answer + AI explanation — free account
9. Which statement is correct? Junior A. ps aux | grep python — make a silent HTTP request that fails the script on a non-2xx status B. ps aux | grep python — stream new lines appended to the log file in real time C. ps aux | grep python — list all processes and filter for those running python D. ps aux | grep python — recursively search files under /var/log for lines containing ERROR Reveal the answer + AI explanation — free account
10. What does tail -f /var/log/app.log do? Junior A. make a silent HTTP request that fails the script on a non-2xx status B. edit the file in place, replacing every dev with prod C. list all processes and filter for those running python D. stream new lines appended to the log file in real time Reveal the answer + AI explanation — free account
11. Which command will stream new lines appended to the log file in real time? Junior A. tail -f /var/log/app.log B. chmod +x deploy.sh C. set -euo pipefail D. curl -fsS https://api/health Reveal the answer + AI explanation — free account
12. Which statement is correct? Junior A. tail -f /var/log/app.log — make a silent HTTP request that fails the script on a non-2xx status B. tail -f /var/log/app.log — print the first whitespace-delimited field of each line C. tail -f /var/log/app.log — edit the file in place, replacing every dev with prod D. tail -f /var/log/app.log — stream new lines appended to the log file in real time Reveal the answer + AI explanation — free account
13. What does awk '{print $1}' access.log do? Mid A. make the deploy.sh script executable B. list all processes and filter for those running python C. print the first whitespace-delimited field of each line D. edit the file in place, replacing every dev with prod Reveal the answer + AI explanation — free account
14. Which command will print the first whitespace-delimited field of each line? Mid A. awk '{print $1}' access.log B. sed -i 's/dev/prod/g' config.ini C. ps aux | grep python D. chmod +x deploy.sh Reveal the answer + AI explanation — free account
15. Which statement is correct? Mid A. awk '{print $1}' access.log — print the first whitespace-delimited field of each line B. awk '{print $1}' access.log — list all processes and filter for those running python C. awk '{print $1}' access.log — make a Bash script exit on error, unset variables and failed pipe stages D. awk '{print $1}' access.log — stream new lines appended to the log file in real time Reveal the answer + AI explanation — free account
16. What does sed -i 's/dev/prod/g' config.ini do? Mid A. recursively search files under /var/log for lines containing ERROR B. run a command in parallel with up to four processes, one argument each C. edit the file in place, replacing every dev with prod D. make a silent HTTP request that fails the script on a non-2xx status Reveal the answer + AI explanation — free account
17. Which command will edit the file in place, replacing every dev with prod? Mid A. sed -i 's/dev/prod/g' config.ini B. curl -fsS https://api/health C. set -euo pipefail D. awk '{print $1}' access.log Reveal the answer + AI explanation — free account
18. Which statement is correct? Mid A. sed -i 's/dev/prod/g' config.ini — list all processes and filter for those running python B. sed -i 's/dev/prod/g' config.ini — edit the file in place, replacing every dev with prod C. sed -i 's/dev/prod/g' config.ini — make a Bash script exit on error, unset variables and failed pipe stages D. sed -i 's/dev/prod/g' config.ini — stream new lines appended to the log file in real time Reveal the answer + AI explanation — free account
19. What does xargs -n1 -P4 do? Mid A. recursively search files under /var/log for lines containing ERROR B. run a command in parallel with up to four processes, one argument each C. make a silent HTTP request that fails the script on a non-2xx status D. stream new lines appended to the log file in real time Reveal the answer + AI explanation — free account
20. Which command will run a command in parallel with up to four processes, one argument each? Mid A. xargs -n1 -P4 B. ps aux | grep python C. sed -i 's/dev/prod/g' config.ini D. set -euo pipefail Reveal the answer + AI explanation — free account
21. Which statement is correct? Mid A. xargs -n1 -P4 — make the deploy.sh script executable B. xargs -n1 -P4 — run a command in parallel with up to four processes, one argument each C. xargs -n1 -P4 — edit the file in place, replacing every dev with prod D. xargs -n1 -P4 — make a silent HTTP request that fails the script on a non-2xx status Reveal the answer + AI explanation — free account
22. What does curl -fsS https://api/health do? Mid A. make a Bash script exit on error, unset variables and failed pipe stages B. list all processes and filter for those running python C. make a silent HTTP request that fails the script on a non-2xx status D. print the first whitespace-delimited field of each line Reveal the answer + AI explanation — free account
23. Which command will make a silent HTTP request that fails the script on a non-2xx status? Mid A. grep -r 'ERROR' /var/log B. chmod +x deploy.sh C. curl -fsS https://api/health D. sed -i 's/dev/prod/g' config.ini Reveal the answer + AI explanation — free account
24. Which statement is correct? Mid A. curl -fsS https://api/health — run a command in parallel with up to four processes, one argument each B. curl -fsS https://api/health — make a silent HTTP request that fails the script on a non-2xx status C. curl -fsS https://api/health — print the first whitespace-delimited field of each line D. curl -fsS https://api/health — list all processes and filter for those running python Reveal the answer + AI explanation — free account
25. What does set -euo pipefail do? Senior A. print the first whitespace-delimited field of each line B. recursively search files under /var/log for lines containing ERROR C. make the deploy.sh script executable D. make a Bash script exit on error, unset variables and failed pipe stages Reveal the answer + AI explanation — free account
26. Which command will make a Bash script exit on error, unset variables and failed pipe stages? Senior A. grep -r 'ERROR' /var/log B. set -euo pipefail C. curl -fsS https://api/health D. tail -f /var/log/app.log Reveal the answer + AI explanation — free account
27. Which statement is correct? Senior A. set -euo pipefail — recursively search files under /var/log for lines containing ERROR B. set -euo pipefail — print the first whitespace-delimited field of each line C. set -euo pipefail — stream new lines appended to the log file in real time D. set -euo pipefail — make a Bash script exit on error, unset variables and failed pipe stages Reveal the answer + AI explanation — free account
28. What is Exit code ? Junior A. the | operator that connects one command's stdout to the next command's stdin B. the time-based scheduler that runs commands on a recurring schedule defined in a crontab C. a service definition that systemd uses to start, supervise and restart long-running daemons D. the integer a process returns where 0 means success and non-zero signals a specific failure Reveal the answer + AI explanation — free account
29. Which term means: "the integer a process returns where 0 means success and non-zero signals a specific failure"? Junior A. systemd unit B. cron C. SIGTERM D. Exit code Reveal the answer + AI explanation — free account
30. Which statement is correct? Junior A. Exit code — the graceful-shutdown signal a container or process receives before being forcefully killed with SIGKILL B. Exit code — the | operator that connects one command's stdout to the next command's stdin C. Exit code — a service definition that systemd uses to start, supervise and restart long-running daemons D. Exit code — the integer a process returns where 0 means success and non-zero signals a specific failure Reveal the answer + AI explanation — free accountShowing 30 of 42 Linux & Bash questions — the full set, with answers, explanations and an AI tutor on every question, is inside.