LPIC exam 101 trainer
By
Pygmalion
These questions are intended to help you train for the LPI exam. Please note that they are not official exam questions.
1.
What umask value prevents group members from executing a new file, whereas other users can neither execute nor write it?
064
013
713
764
2.
You wish to kill a process with a PID of 123. Select the command which will allow the process to "clean up" before exiting.
kill -1 123
kill -9 123
kill -15 123
kill -17 123
3.
What expression should be used to display every line that begins with an a and ends with a z in 'grep <expression> file.txt' ?
"$a.*^z"
"^a.*z$"
"^a.?z$"
"$a.?z^"
4.
Your system is becoming a bit unreponsive due to a program with PID 9519. You don't want to kill it. What other option do you have?
nice +10 -p 9519
nice -10 -p 9519
renice +10 -p 9519
renice -10 -p 9519
5.
File 'script' in your current directory has mode string -rwxr-xr-x, yet the command './script' yields './script: Permission denied'. How would you explain?
'script' can only be executed by the file owner.
'script' is not an executable file.
'script' is in a filesystem mounted with 'noexec'.
A needed shared library cannot be opened.
6.
You desperately need a program on your Debian box, but all you can find on google is an rpm package for RedHat. What command will allow you to (try to) install this rpm package anyway?
dpkg -ir
alien
yum
dselect
7.
Which of the following command sequences is NOT a common way to leave the vi editor?
:x
:q!
ZZ
:qw!
8.
Which command would you put in your ~/.profile to ensure that all new files you create are readable by people who are in the same group while anybody else has no access at all? (choose the best answer)
umask 640
ulimit 750
umask 027
ulimit 640
9.
Which of the following commands will NOT update the Modify timestamp on the file /tmp/myfile.txt?
file /tmp/myfile.txt
echo "Hello" >/tmp/myfile.txt
sed -i "s/1/2/" /tmp/myfile.txt
echo -n "Hello" >/tmp/myfile.txt
touch /tmp/myfile.txt
10.
How would you list all files starting with x, y or z?
ls ^xyz*
ls [xyz]+
ls [xyz]*
ls ^[xyz].*