[Free] Download New Latest (November) CompTIA LX0-101 Actual Tests 41-50

Ensurepass

QUESTION 41

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

 

A.

cat -n 10 filename

B.

dump -n 10 filename

C.

head -n 10 filename

D.

tail -n 10 filename

 

Answer: D

 

 

QUESTION 42

Which of the following commands is used to change options and positional parameters for a running Bash?

 

A.

history

B.

set

C.

bashconf

D.

setsh

E.

envsetup

 

Answer: B

 

 

QUESTION 43

A user accidentally created the subdirectory dir in his home directory. Which of the following commands will remove that directory?

 

A.

rmdir ‘~/dir’

B.

rmdir “~/dir”

C.

rmdir ~/’dir’

D.

rmdir ~/dir

E.

rmdir ~/\dir

 

Answer: E

 

 

QUESTION 44

Which of the following commands replaces each occurrence of ‘bob’ in the file letter with ‘Bob’ and writes the result to the file newletter?

 

A.

sed ‘/bob/Bob’ letter > newletter

B.

sed s/bob/Bob/ letter < newletter

C.

sed ‘s/bob/Bob’ letter > newletter

D.

sed ‘s/bob/Bob/g’ letter > newletter

E.

sed ‘s/bob, Bob/’ letter > newletter

 

Answer: D

 

 

QUESTION 45

Immediately after deleting 3 lines of text in vi and moving the cursor to a different line, which single character command will insert the deleted content below the current line?

 

A.

i (lowercase)

B.

P (uppercase)

C.

p (lowercase)

D.

U (uppercase)

E.

u (lowercase)

 

Answer: C

 

 

QUESTION 46

Which of the following files, located in the user home directory, is used to store the Bash history?

 

A.

.bash_history

B.

.bash_histfile

C.

.history

D.

.bashrc_history

E.

.history_bash

 

Answer: A

 

 

QUESTION 47

When given the following command line.

 

echo “foo bar” | tee bar | cat

 

Which of the following output is created?

 

A.

cat

B.

foo bar

C.

tee bar

D.

bar

E.

foo

 

Answer: B

 

 

QUESTION 48

What does the ? symbol within regular expressions represent?

 

A.

Match the preceding qualifier one or more times.

B.

Match the preceding qualifier zero or more times.

C.

Match the preceding qualifier zero or one times.

D.

Match a literal ? character.

 

Answer: C

 

 

QUESTION 49

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

 

A.

vi starts and loads the last file used and moves the cursor to the position where vi was when it last exited.

B.

vi starts and requires the user to explicitly either create a new or load an existing file.

C.

vi exits with an error message as it cannot be invoked without a file name to operate on.

D.

vi starts in command mode and opens a new empty file.

E.

vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.

 

Answer: D

 

 

QUESTION 50

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

 

Answer: mkdir, /usr/bin/mkdir

 

Free VCE & PDF File for CompTIA LX0-101 Actual Tests

Instant Access to Free VCE Files: CompTIA | VMware | SAP …
Instant Access to Free PDF Files: CompTIA | VMware | SAP …

This entry was posted in LX0-101 Actual Tests (November) and tagged , , , , , , . Bookmark the permalink.