Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmas50

LPI 102-500 - LPIC-1 Exam 102, Part 2 of 2, version 5.0

Page: 7 / 7
Total 235 questions

What output will the following command produce?

seq 1 5 20

A.

1

6

1

1

1

6

B.

1

5

10

15

C.

1

2

3

4

D.

2

3

4

5

E.

5

10

15

20

Which of the following SQL queries counts the number of occurrences for each value of the field order_type in the table orders?

A.

SELECT order_type,COUNT(*) FROM orders WHERE order_type=order_type;

B.

SELECT order_type,COUNT(*) FROM orders GROUP BY order_type;

C.

COUNT(SELECT order_type FROM orders);

D.

SELECT COUNT(*) FROM orders ORDER BY order_type;

E.

SELECT AUTO_COUNT FROM orders COUNT order_type;

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

A.

/etc/bashrc

B.

/etc/profile

C.

~/.bash_profile

D.

/etc/.bashrc

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

____ i in *.txt; do

echo $i

done

A.

for

B.

loop

C.

until

D.

while

What word is missing from the following SQL statement?

__________ count(*) from tablename;

(Please specify the missing word using lower-case letters only.)

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.

B.

This script provides identical functionality as the file at that location.

C.

This script will self-extract into a file at that location.

D.

The program at that location will be used to process the script.

What benefit does an alias in bash provide?

A.

It provides faster lookups for commands in the system directory.

B.

It creates a local copy of a file from another directory.

C.

It hides what command you are running from others.

D.

It allows a string to be substituted for the first word of a simple command.

Which command makes the shell variable named VARIABLE visible to subshells?

A.

export $VARIABLE

B.

export VARIABLE

C.

set $VARIABLE

D.

set VARIABLE

E.

env VARIABLE

Which of the following commands lists all defined variables and functions within Bash?

A.

env

B.

set

C.

env -a

D.

echo $ENV

What is the purpose of the file /etc/profile?

A.

It contains the welcome message that is displayed after login.

B.

It contains security profiles defining which users are allowed to log in.

C.

It contains environment variables that are set when a user logs in.

D.

It contains default application profiles for users that run an application for the first time.