ExamGecko
Home Home / LPI / 101-500

LPI 101-500 Practice Test - Questions Answers, Page 25

Question list
Search
Search

Which of the following commands displays the path to the executable file that would be executed when the command foo is invoked?

A.
lsattr foo
A.
lsattr foo
Answers
B.
apropos foo
B.
apropos foo
Answers
C.
locate foo
C.
locate foo
Answers
D.
whatis foo
D.
whatis foo
Answers
E.
which foo
E.
which foo
Answers
Suggested answer: A

When redirecting the output of find to the xargs command, what option to find is useful if the filenames contain spaces?

A.
-rep-space
A.
-rep-space
Answers
B.
-printnul
B.
-printnul
Answers
C.
-nospace
C.
-nospace
Answers
D.
-ignore-space
D.
-ignore-space
Answers
E.
-print0
E.
-print0
Answers
Suggested answer: E

What is true regarding the command ls > files if files does not exist?

A.
The output of ls is printed to the terminal
A.
The output of ls is printed to the terminal
Answers
B.
files is created and contains the output of ls
B.
files is created and contains the output of ls
Answers
C.
An error message is shown and ls is not executed
C.
An error message is shown and ls is not executed
Answers
D.
The command files is executed and receives the output of ls
D.
The command files is executed and receives the output of ls
Answers
E.
Any output of ls is discarded
E.
Any output of ls is discarded
Answers
Suggested answer: B

Which of the following files, located in a user's home directory, contains the Bash history?

A.
.bashrc_history
A.
.bashrc_history
Answers
B.
.bash_histfile
B.
.bash_histfile
Answers
C.
.history
C.
.history
Answers
D.
.bash_history
D.
.bash_history
Answers
E.
.history_bash
E.
.history_bash
Answers
Suggested answer: B

Which wildcards will match the following filenames? (Choose two.) ttyS0 ttyS1 ttyS2

A.
ttyS[1-5]
A.
ttyS[1-5]
Answers
B.
tty?[0-5]
B.
tty?[0-5]
Answers
C.
tty*2
C.
tty*2
Answers
D.
tty[A-Z][012]
D.
tty[A-Z][012]
Answers
E.
tty[Ss][02]
E.
tty[Ss][02]
Answers
Suggested answer: B, D

Which of the following commands redirects the output of ls to standard error?

A.
ls >-1
A.
ls >-1
Answers
B.
ls <<ERR
B.
ls <<ERR
Answers
C.
ls >&2
C.
ls >&2
Answers
D.
ls >>2
D.
ls >>2
Answers
E.
ls |error
E.
ls |error
Answers
Suggested answer: C

Explanation:



Total 246 questions
Go to page: of 25