LPIC exam 101 trainer
These questions are intended to help you train for the LPI exam. Please note that they are not official exam questions.
You've installed Samba from source and want to locate the smb.conf file. What's your best chance? (choose the 2 best answers)
find / -name smb.conf
updatedb; locate smb.conf
While using the vi editor, you wish to move ahead one page. You should press the control key and:
Which of the following command lines can be used to convert DOS style CRLF line endings to UNIX style LF?
strip '\r' < dosfile > unixfile
tr -d '\r' < dosfile > unixfile
grep '\n' dosfile > unixfile
sed 's/\n//' dosfile > unixfile
You killed a rogue process that filled /tmp with files with extension .foo, but trying to clean up /tmp you get the error: 'rm: argument list too long'. Which of the following commands will allow you to remove all *.foo files in /tmp?
rm `ls | grep '.foo$'`
ls *.foo | xargs rm
ls | grep '.foo$' | xargs rm
xargs rm `ls | grep '.foo$'`
You administer a system with quota enabled. The powers that be have asked you to add a new user Sam. Sam should have the same amount of diskspace available as his colleague Mose. What command would you use? (choose the best answer)
repquota -a sam -p mose
edquota -p mose sam
quotaon sam -p mose
quotactl -n sam -p mose
Which of the following characters is an extended regular expression meta-character, but only a regular character in basic regular expressions?
How would you examine kernel bootup messages?
dmesg | less
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?
User Pygmalion has successfully extracted and compiled a program from source code. Installing the binaries produces errors. What is the most likely reason?
The source code was compiled for a different CPU.
The permissions set in the /usr/bin directory are wrong.
The binaries require root privileges to be installed.
The wrong prefix was used during configuration of the source code.
Given the command 'ps -auxw | tee list', where will the process list be sent?
To standard output and to standard error.
To standard output and to a file called tee.
To standard output and to a file called list.
To a file called tee and to a file called list.