QUESTION 11 You have a bunch of text files in your home directory, and you are t
ID: 3809612 • Letter: Q
Question
QUESTION 11
You have a bunch of text files in your home directory, and you are trying to find which ones contain the name "Backman". You are not certain if the name is all lowercase, has only the first letter capitalized, or is all caps.
What command would you type to search within all the files in your current working directory for the name "Backman", and ignore case?
grep * [BACKMAN]
grep -c * Backman
grep -i backman *
find -i * backman
QUESTION 12
What is the traditional name of the superuser or most powerful account in Unix?
manager
domain administrator
supervisor
root
QUESTION 13
How would you view the last 50 lines of a long text file named "Homer.txt"?
more -c 50 Homer.txt
tail Homer.txt | wc -l 50
grep 50 Homer.txt
tail -n 50 Homer.txt
QUESTION 14
Which command would delete all files in your current directory that have a filename that is exactly three letters long which ends with the letter t?
rm ??t
rm ???t
rm [3]t
rm -r *t*
QUESTION 15
In the vi text editor, which key sequence will delete the current line while in command mode?
x
dl
dd
ZZ
QUESTION 16
In the vi text editor, which key sequence will bring you to the end of the current line while in command mode?
L
$
l
e
QUESTION 17
In the vi text editor, which sequence of commands will copy the current line and past a copy of it below? (go ahead and try these to find out!)
"c" then "v"
"yy" then "p"
"C" then "p"
"D" then "p"
QUESTION 18
Which commands will get you out of the vi text editor without saving your changes?
ESC :z
/quit
ESC :nc
ESC :q!
QUESTION 19
On debian-based systems, which command will list currently installed software packages?
apt-get -l
dpkg -l
list-packages
pkg --list
QUESTION 20
Match the package manager to the operating system/distribution
rpm/yum
deb/apt-get
pkg
rpm/zypper
openSUSE
FreeBSD 10
Redhat
Ubuntu
a.grep * [BACKMAN]
b.grep -c * Backman
c.grep -i backman *
d.find -i * backman
Explanation / Answer
11.C.ls|grep -i backman * wi fetch -i means ignore case
grep -c means gives count
12.D.root
13.D.tail -n 50 Homer.txt
tail command is used for last and -n for lines
14. A.rm ??t
Wildcard ? for one char * for multiple so ?? and ends in t
rm ??t
15.C
ndd will delete the line under the cursor nlines from cursor position
16.B
17.
0 move to beginning of the current line $ move to end of line H move to the top of the current window (high) M move to the middle of the current window (middle) L move to the bottom line of the current window (low)Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.