GNU and Unix commands — page 4
Objective 103 of LPIC-1 Exam 101-500, worth 43.33% of the exam. This is page 4 of 7 of its question list; page one carries the full objective summary.
- Share of the exam
- 43.33%
- Questions in a real sitting
- roughly 26 of 60
- Questions in this bank
- 130
- Signed for by a person
- 0
- Machine-checked only
- 130
Partly checked. None of the 130 questions here has been read against the cited source by a person. 130 questions have been checked against their cited clause by an automated pass — which is not the same thing, and is not a signature.
Only questions a person has signed for are used in mock exams here. That is the whole difference between the two kinds of checking above.
How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.
What this objective covers
The 130 questions written for this objective cite 8 LPI exam objectives (103.1, 103.2, 103.3, 103.4, 103.5, 103.6, 103.7, 103.8) and 34 manual pages (bash(1), bzip2(1), cp(1), cpio(1), crontab(1), dd(1), env(1), find(1), getpriority(2), glob(7), grep(1), gzip(1), ls(1), man(1), mv(1), nano(1), nice(1), nohup(1), ps(1), regex(7), renice(1), rmdir(1), screen(1), sed(1), signal(7), tar(1), tee(1), top(1), touch(1), uname(1), vi(1p), vim(1), wc(1), xargs(1)).
They break down as 88 single-answer questions, 18 choose-several questions and 24 type-the-answer questions.
Drill this objective
The trainer can run a short practice set drawn from this objective alone, which is what the weight column above is for: revise the heavy objectives first.
Practise GNU and Unix commands
Questions on this objective (page 4 of 7)
- A long compile prints diagnostics on standard error. `make | grep -i error` shows nothing useful, because the error lines scroll past on the terminal instead of entering the pipe. Which command line passes both output streams through grep? machine-checked
- You want to send a signal to every httpd process, using the process IDs that `pgrep httpd` prints, on one command line. kill takes its PIDs as arguments, not on standard input. Which construct places the output of one command into the argument list of another? machine-checked
- A script must store the number of lines in /var/log/syslog in a variable, so the output has to be the bare number with no file name after it. Which command produces exactly that? machine-checked
- The shell has been started with `set -o noclobber`. The command `sort names.txt > sorted.txt` now fails, reporting that it cannot overwrite the existing file. Which command replaces the contents of sorted.txt without switching the option off? machine-checked
- An hourly job is started from cron. Its normal output should keep going to cron as usual, while its error messages must accumulate in /var/log/job.err so that the previous hours' messages survive. Which redirection belongs on the command line? machine-checked
- Select the THREE true statements about GNU xargs. machine-checked
- Select the TWO true statements about tee and about writing files from a pipeline. machine-checked
- Type the command, with no options or arguments, that reads items from standard input and builds command lines from them so that another program receives them as arguments. machine-checked
- Searching the whole filesystem as an ordinary user buries the results under "Permission denied" notices from directories you cannot read. Type the complete command line that runs `find / -name core` and discards only those notices, leaving the matched paths on the terminal. machine-checked
- `sort` can take a file name as an operand, but here it must receive the contents of names.txt on its standard input instead. Type the complete command line that runs `sort` with its standard input redirected from names.txt. machine-checked
- You run `kill 3120` with no other options. Which signal does the process receive? machine-checked
- You know only the program name and want to terminate every running process called `httpd`. Which command does that in one step? machine-checked
- You edited a daemon's configuration file and want the running daemon to reread it without restarting. Which signal is conventionally used? machine-checked
- You press Ctrl+Z while a long-running command occupies the foreground of your bash shell. What happens? machine-checked
- A backup script must keep running after you close your SSH session. You have not started it yet. Which invocation is designed for exactly this? machine-checked
- Which command re-runs `df -h` every 5 seconds and redraws the result in place? machine-checked
- In the standard `uptime` output, what are the three numbers reported at the end of the line? machine-checked
- Which statement about nice values on Linux is correct? machine-checked
- User anna started a job that currently has nice value 10. As anna, she runs `renice 5 -p <pid>` to set its nice value to 5. What happens? machine-checked
- From a shell running at the default nice value of 0, which command starts `./render.sh` with nice value 15 so it competes weakly for CPU time? machine-checked
Practise GNU and Unix commands
The other objectives in LPIC-1 Exam 101-500
- 101. System architecture — 13.33% of the exam
- 102. Linux installation and package management — 18.33% of the exam
- 104. Devices, Linux filesystems, filesystem hierarchy standard — 25% of the exam