Question: QUESTION 11 Which command would you type to view the last few lines of a file named /var/log/messages ? a. head /var/log/messages b. tail /var/log/messages

QUESTION 11

Which command would you type to view the last few lines of a file named "/var/log/messages" ?

a.

head /var/log/messages

b.

tail /var/log/messages

c.

wc -e /var/log/messages

d.

grep -n 5 /var/log/messages

QUESTION 12

Which command would delete all files in your current directory that end with .mp3 ?

a.

rm -r mp3

b.

delete -a mp3

c.

rm *.mp3

d.

rm -all mp3

QUESTION 13

You have a file named "students.txt" that lists the names of all the students in the schoolsystem. You want to count how many of the names (either first or last) contain Franklin.

Which command would do this for you?

a.

grep -c Franklin students.txt

b.

wc -l -s Franklin student.txt

c.

wc -l students.txt | grep Franklin

d.

grep students.txt Franklin | count -l

QUESTION 14

Which of the following commands will bring you to your home directory (there might be more than one)?

a.

cd

b.

cd ~

c.

cd /

d.

cd $HOME

QUESTION 15

In the vi text editor, what commands would you type to save your document and quit?

a.

ESC :wq

b.

:sq

c.

ESC q!

d.

F1 q

QUESTION 16

Assuming you are in command mode, which command will delete a signle character under the cursor in the vi text editor?

a.

d

b.

s

c.

r

d.

x

QUESTION 17

When using the vi text editor to edit a file, why can you just start typing away right after opening the file?

a.

Vi is a modal text editor, and is in command mode by default when first opened.

b.

Vi takes a minute at startup to verify the file syntax.

c.

Vi needs to be told if the file is ascii or binary after opening the file.

d.

Vi starts in read-only mode by default.

QUESTION 18

True or false? All versions of Unix and Linux use the same package managers and commands for installing software.

True

False

QUESTION 19

On a debian-based system, which command would you type to install a package called bb?

a.

sudo install -d bb

b.

sudo apt-get install bb

c.

sudo rpm -V bb

d.

sudo yum -i bb

QUESTION 20

Which command would you type to view all connected filesystems in Unix?

a.

ps axm

b.

lm -a

c.

ls /

d.

mount

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!