ExamGecko
Home Home / LPI / 101-500

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

Question list
Search
Search

When starting a program with the nice command without any additional parameters, which nice level is set for the resulting process?

A.
-10
A.
-10
Answers
B.
0
B.
0
Answers
C.
10
C.
10
Answers
D.
20
D.
20
Answers
Suggested answer: C

Which of the following commands will reduce all consecutive spaces down to a single space?

A.
tr '\s' ' ' < a.txt > b.txt
A.
tr '\s' ' ' < a.txt > b.txt
Answers
B.
tr -c ' ' < a.txt > b.txt
B.
tr -c ' ' < a.txt > b.txt
Answers
C.
tr -d ' ' < a.txt > b.txt
C.
tr -d ' ' < a.txt > b.txt
Answers
D.
tr -r ' ' '\n' < a.txt > b.txt
D.
tr -r ' ' '\n' < a.txt > b.txt
Answers
E.
tr -s ' ' < a.txt > b.txt
E.
tr -s ' ' < a.txt > b.txt
Answers
Suggested answer: E

Which character, added to the end of a command, runs that command in the background as a child process of the current shell?

A.
!
A.
!
Answers
B.
+
B.
+
Answers
C.
&
C.
&
Answers
D.
%
D.
%
Answers
E.
#
E.
#
Answers
Suggested answer: C

Which of the following commands will print the last 10 lines of a text file to the standard output?

A.
cat -n 10 filename
A.
cat -n 10 filename
Answers
B.
dump -n 10 filename
B.
dump -n 10 filename
Answers
C.
head -n 10 filename
C.
head -n 10 filename
Answers
D.
tail -n 10 filename
D.
tail -n 10 filename
Answers
Suggested answer: D

Which of the following commands prints a list of usernames (first column) and their primary group (fourth column) from the /etc/passwd file?

A.
fmt -f 1,4 /etc/passwd
A.
fmt -f 1,4 /etc/passwd
Answers
B.
split -c 1,4 /etc/passwd
B.
split -c 1,4 /etc/passwd
Answers
C.
cut -d : -f 1,4 /etc/passwd
C.
cut -d : -f 1,4 /etc/passwd
Answers
D.
paste -f 1,4 /etc/passwd
D.
paste -f 1,4 /etc/passwd
Answers
Suggested answer: C

Which of the following signals is sent to a process when the key combination CTRL+C is pressed on the keyboard?

A.
SIGTERM
A.
SIGTERM
Answers
B.
SIGINT
B.
SIGINT
Answers
C.
SIGSTOP
C.
SIGSTOP
Answers
D.
SIGKILL
D.
SIGKILL
Answers
Suggested answer: B

What happens after issuing the command vi without any additional parameters?

A.
vi starts and loads the last file used andmoves the cursor to the position where vi was when it last exited.
A.
vi starts and loads the last file used andmoves the cursor to the position where vi was when it last exited.
Answers
B.
vi starts and requires the user to explicitly either create a new or load an existing file.
B.
vi starts and requires the user to explicitly either create a new or load an existing file.
Answers
C.
vi exits with an error message as it cannot be invoked without a file name to operate on.
C.
vi exits with an error message as it cannot be invoked without a file name to operate on.
Answers
D.
vi starts in command mode and opens a new empty file.
D.
vi starts in command mode and opens a new empty file.
Answers
E.
vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.
E.
vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.
Answers
Suggested answer: D

Which of the following command sets the Bash variable named TEST with the content FOO?

A.
set TEST="FOO"
A.
set TEST="FOO"
Answers
B.
TEST = "FOO"
B.
TEST = "FOO"
Answers
C.
var TEST="FOO"
C.
var TEST="FOO"
Answers
D.
TEST="FOO"
D.
TEST="FOO"
Answers
Suggested answer: D

Which variable defines the directories in which a Bash shell searches for executable commands?

A.
BASHEXEC
A.
BASHEXEC
Answers
B.
BASHRC
B.
BASHRC
Answers
C.
PATH
C.
PATH
Answers
D.
EXECPATH
D.
EXECPATH
Answers
E.
PATHRC
E.
PATHRC
Answers
Suggested answer: C

Which of the following commands determines the type of a file by using a definition database file which contains information about all common file types?

A.
magic
A.
magic
Answers
B.
type
B.
type
Answers
C.
file
C.
file
Answers
D.
pmagic
D.
pmagic
Answers
E.
hash
E.
hash
Answers
Suggested answer: C
Total 246 questions
Go to page: of 25