ExamGecko
Home Home / LPI / 102-500

LPI 102-500 Practice Test - Questions Answers, Page 3

Question list
Search
Search

Which of the following SQL statements will select the fields name and address from the contacts table?

A.
SELECT (name, address) FROM contacts;
A.
SELECT (name, address) FROM contacts;
Answers
B.
SELECT (name address) FROM contacts;
B.
SELECT (name address) FROM contacts;
Answers
C.
SELECT name, address FROM contacts;
C.
SELECT name, address FROM contacts;
Answers
D.
SELECT name address FROM contacts;
D.
SELECT name address FROM contacts;
Answers
Suggested answer: C

Which directory in /etc is used to keep a sample copy of files and directories for when a new user has a home directory created? (Please provide the full path)

A.
/etc/skel,/etc/skel/
A.
/etc/skel,/etc/skel/
Answers
Suggested answer: A

Which of the following configuration files should be modified to set default shell variables for all users?

A.
/etc/bashrc
A.
/etc/bashrc
Answers
B.
/etc/profile
B.
/etc/profile
Answers
C.
~/.bash_profile
C.
~/.bash_profile
Answers
D.
/etc/.bashrc
D.
/etc/.bashrc
Answers
Suggested answer: B

Which of the following is the best way to list all defined shell variables?

A.
env
A.
env
Answers
B.
set
B.
set
Answers
C.
env -a
C.
env -a
Answers
D.
echo $ENV
D.
echo $ENV
Answers
Suggested answer: B

Which command allows you to make a shell variable visible to subshells?

A.
export $VARIABLE
A.
export $VARIABLE
Answers
B.
export VARIABLE
B.
export VARIABLE
Answers
C.
set $VARIABLE
C.
set $VARIABLE
Answers
D.
set VARIABLE
D.
set VARIABLE
Answers
E.
env VARIABLE
E.
env VARIABLE
Answers
Suggested answer: B

Which of the following words is used to restrict the records that are returned from a SELECT query based on a supplied criteria for the values in the records?

A.
LIMIT
A.
LIMIT
Answers
B.
FROM
B.
FROM
Answers
C.
WHERE
C.
WHERE
Answers
D.
IF
D.
IF
Answers
Suggested answer: C

What benefit does an alias in bash provide?

A.
It provides faster lookups for commands in the system directory.
A.
It provides faster lookups for commands in the system directory.
Answers
B.
It creates a local copy of a file from another directory.
B.
It creates a local copy of a file from another directory.
Answers
C.
It hides what command you are running from others.
C.
It hides what command you are running from others.
Answers
D.
It allows a string to be substituted for the first word of a simple command.
D.
It allows a string to be substituted for the first word of a simple command.
Answers
Suggested answer: D

You are looking into a new script you received from your senior administrator. In the very first line you notice a #! followed by a file path. This indicates that:

A.
The file at that location was used to make the script.
A.
The file at that location was used to make the script.
Answers
B.
This script provides identical functionality as the file at that location.
B.
This script provides identical functionality as the file at that location.
Answers
C.
This script will self-extract into a file at that location.
C.
This script will self-extract into a file at that location.
Answers
D.
The program at that location will be used to process the script.
D.
The program at that location will be used to process the script.
Answers
Suggested answer: D

What keyword is missing from this code sample of a shell script?

____ i in *.txt; do echo $i done

A.
for
A.
for
Answers
B.
loop
B.
loop
Answers
C.
until
C.
until
Answers
D.
while
D.
while
Answers
Suggested answer: A

Explanation:

Topic 2, User Interfaces and Desktops

Which file used by XDM specifies the default wallpaper?

A.
/etc/X11/xdm/Xsetup
A.
/etc/X11/xdm/Xsetup
Answers
B.
/etc/X11/xdm.conf
B.
/etc/X11/xdm.conf
Answers
C.
/etc/X11/xdm/Defaults
C.
/etc/X11/xdm/Defaults
Answers
D.
/etc/X11/defaults.conf
D.
/etc/X11/defaults.conf
Answers
Suggested answer: A
Total 194 questions
Go to page: of 20