Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 11 Which command would you type to view the last few lines of a file na

ID: 3862883 • Letter: Q

Question

QUESTION 11

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

head /var/log/messages

tail /var/log/messages

wc -e /var/log/messages

grep -n 5 /var/log/messages

QUESTION 12

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

rm -r mp3

delete -a mp3

rm *.mp3

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?

grep -c Franklin students.txt

wc -l -s Franklin student.txt

wc -l students.txt | grep Franklin

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)?

cd

cd ~

cd /

cd $HOME

QUESTION 15

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

ESC :wq

:sq

ESC q!

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?

d

s

r

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?

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

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

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

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?

sudo install -d bb

sudo apt-get install bb

sudo rpm -V bb

sudo yum -i bb

QUESTION 20

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

ps axm

lm -a

ls /

mount

a.

head /var/log/messages

b.

tail /var/log/messages

c.

wc -e /var/log/messages

d.

grep -n 5 /var/log/messages

Explanation / Answer

11A)b tail /var/log/messages

12A)c

13A)a

14A)b

15A)a

16A)d

18A)false

19A)b

20A)a

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote