ExamGecko
Home / LPI / 101-500
Ask Question

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

Question list
Search

List of questions

Search

Question 101

Report
Export
Collapse

CORRECT TEXT

Which command is used in a Linux environment to create a new directory? (Specify ONLY the command without any path or parameters.)

mkdir,/usr/bin/mkdir
mkdir,/usr/bin/mkdir
Suggested answer: A
asked 18/09/2024
sergio sombrero
34 questions

Question 102

Report
Export
Collapse

Which of the following commands prints all files and directories within the /tmp directory or its subdirectories which are also owned by the user root? (Choose TWO correct answers.)

find /tmp -uid root -print
find /tmp -uid root -print
find -path /tmp -uid root
find -path /tmp -uid root
find /tmp -user root -print
find /tmp -user root -print
find /tmp -user root
find /tmp -user root
find -path /tmp -user root -print
find -path /tmp -user root -print
Suggested answer: C, D
asked 18/09/2024
Alex Pilallis
43 questions

Question 103

Report
Export
Collapse

When running the command sed -e "s/a/b/" /tmp/file >/tmp/file While /tmp/file contains data, why is /tmp/file empty afterwards?

The file order is incorrect. The destination file must be mentioned before the command to ensure redirection.
The file order is incorrect. The destination file must be mentioned before the command to ensure redirection.
The command sed did not match anything in that file therefore the output is empty.
The command sed did not match anything in that file therefore the output is empty.
When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens itfor reading.
When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens itfor reading.
Redirection for shell commands do not work using the > character. It only works using the | character instead.
Redirection for shell commands do not work using the > character. It only works using the | character instead.
Suggested answer: C
asked 18/09/2024
Martin White
35 questions

Question 104

Report
Export
Collapse

When given the following command line. echo "foo bar" | tee bar | cat Which of the following output is created?

cat
cat
foo bar
foo bar
tee bar
tee bar
bar
bar
foo
foo
Suggested answer: B
asked 18/09/2024
FELIPE VILLAGOMEZ CARDENAS VILLAGOMEZ
42 questions

Question 105

Report
Export
Collapse

Which of the following commands can be used to determine how long the system has been running?

(Choose TWO correct answers.)

uptime
uptime
up
up
top
top
uname -u
uname -u
time -up
time -up
Suggested answer: A, C
asked 18/09/2024
Lazar Marinovic
34 questions

Question 106

Report
Export
Collapse

Which of the following are valid stream redirection operators within Bash? (Choose THREE correct answers.)

<
<
<<<
<<<
>
>
>>>
>>>
%>
%>
Suggested answer: A, B, C
asked 18/09/2024
Aung Nyi Nyi Win
30 questions

Question 107

Report
Export
Collapse

Which of the following explanations are valid reasons to run a command in the background of your shell?

The command does not need to execute immediately.
The command does not need to execute immediately.
The command has to run immediately but the user needs to log out.
The command has to run immediately but the user needs to log out.
The system is being shut down and the command needs to restart execution immediately after the reboot.
The system is being shut down and the command needs to restart execution immediately after the reboot.
Suggested answer: B

Explanation:

A. The command does not need to execute immediately.

B. The command has to run immediately but the user needs to log out.

C. The system is being shut down and the command needs to restart execution immediately after the reboot.

D. The command can run at a lower priority than normal commands run on the command line.

Answer: B

Explanation:

asked 18/09/2024
Tebello Mofokeng
29 questions

Question 108

Report
Export
Collapse

What does the + symbol mean in the following grep regular expression: grep '^d[aei]\+d$' /usr/share/dict/words

Match the preceding character set ([aei]) one or more times.
Match the preceding character set ([aei]) one or more times.
Match the preceding character set ([aei]) zero or more times.
Match the preceding character set ([aei]) zero or more times.
Match the preceding character set ([aei]) zero or one times.
Match the preceding character set ([aei]) zero or one times.
Match a literal + symbol.
Match a literal + symbol.
Suggested answer: A
asked 18/09/2024
Brett Tin
37 questions

Question 109

Report
Export
Collapse

While editing a file in vi, the file changes due to another process. Without exiting vi, how can the file be reopened for editing with the new content?

:r
:r
:n
:n
:w
:w
:e
:e
Suggested answer: D
asked 18/09/2024
Baheilu Tekelu
38 questions

Question 110

Report
Export
Collapse

You are trying to make a hard link to an ordinary file but ln returns an error. Which of the following could cause this?

The source file is hidden.
The source file is hidden.
The source file is read-only.
The source file is read-only.
The source file is a shell script.
The source file is a shell script.
You do not own the source file.
You do not own the source file.
The source and the target are on different filesystems.
The source and the target are on different filesystems.
Suggested answer: E
asked 18/09/2024
Eduardo Rives
40 questions
Total 246 questions
Go to page: of 25