Which of the following commands creates the ZIP archive poems.zip containing all files in the current directory whose names end in .txt?
A. zip *.txt > poems.zip
B. zcat *.txt poems.zip
C. zip poems.zip *.txt
D. zip cfz poems.zip *.txt
E. cat *.txt | zip poems.zip
What is the return value of a shell script after successful execution?
A. 1
B. 0
C. -1
D. -255
E. 255
The file script.sh in the current directory contains the following content:
#!/bin/bash echo $MYVAR
The following commands are used to execute this script:
MYVAR=value ./script.sh
The result is an empty line instead of the content of the variable MYVAR. How should MYVAR be set in order to make script.sh display the content of MYVAR?
A. !MYVAR=value
B. env MYVAR=value
C. MYVAR=value
D. $MYVAR=value
E. export MYVAR=value
Which operator in a regular expression matches the preceding character either zero or one time?
A. ?
B. *
C. +
D. %
E. $
Which of the following examples shows the general structure of a for loop in a shell script?
A. for *.txt as file => echo $file
B. for *.txt ( echo $i )
C. for file in *.txt do
echo $i
done
D. for ls *.txt exec {} \;
E. foreach @{file} { echo $i }
Which command copies the contents of the directory /etc/, including all sub-directories, to /root/?
A. copy /etc /root
B. cp -r /etc/* /root
C. cp -v /etc/* /root
D. rcp /etc/* /root
E. cp -R /etc/*.* /root
Which of the following commands puts the lines of the file data.csv into alphabetical order?
A. a..z data.csv
B. sort data.csv
C. abc data.csv
D. wc -s data.csv
E. grep --sort data.csv
Which of the following commands sets the variable USERNAME to the value bob?
A. set USERNAME bob
B. $USERNAME==bob
C. var USERNAME=bob
D. USERNAME<=bob
E. USERNAME=bob
What is the purpose of the PATH environment variable?
A. It allows the execution of commands without the need to know the location of the executable.
B. It increases security by preventing commands from running in certain locations.
C. It specifies the location of a user's home directory.
D. It indicates the location of the default shell to be used when a user logs in.
E. It contains the absolute path to the current directory.
Which command displays file names only and no additional information?
A. ls -a
B. ls -lh
C. ls -l
D. ls -alh
E. ls -nl
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Lpi exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 010-160 exam preparations and Lpi certification application, do not hesitate to visit our Vcedump.com to find your solutions here.