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 command line redirection characters instruct the shell to read from the current input source until a specific word, on a separate line and without trailing spaces, is reached?
 
<<
<
!<
&<
%<
 
2. What is the default signal for the kill command if no signal is specified as a command-line option?
 
SIGHUP
SIGINT
SIGKILL
SIGTERM
 
3. You want to examine the changelog for the installed package postfix. Which command(s) will display the changelog?
 
rpm -Vc postfix
rpm -qpil postfix
rpm --changelog postfix
rpm -q --changelog postfix
rpm -qa --changelog postfix
 
4. On a Debian system, what command can be used best to install the downloaded package package.deb?
 
apt-get install package.deb
dpkg -i package.deb
dpkg package.deb
apt install package.deb
 
5. You want to list file foo.txt line by line, but in reverse order. What command would you use?
 
ls -r foo.txt | cat
cat -r foo.txt
tac foo.txt
cat foo.txt | ls -r
 
6. You have a text file with tab-separated values, but your application needs them space-separated. What command would you use from the Bash shell to achieve this?
 
unexpand
expand
grep
cut
 
7. How can you check the number of free inodes on partition /dev/sda2?
 
du -i /dev/sda2
df -i /dev/sda2
ls -i /dev/sda2
free -i /dev/sda2
 
8. The command e2fsck can be used to check which of the following types of filesystems? (choose 2)
 
ext2
ext3
jfs
vfat
 
9. Which of the following will display the string "oops" when the command foo fails?
 
foo && echo "oops"
foo || echo "oops"
foo ; echo "oops"
foo | echo "oops"
 
10. Which command adds the data in file 'mypackages' to the existing data in the package database?
 
dpkg --add mypackages
dpkg --merge-avail mypackages
dpkg --update-avail mypackages
dpkg --include-pkg mypackages