CompTIA LINUX+ Advanced GNU and Unix Commands Flashcards

1
Q

You want to prep a text file to use specific delimiters, and before you do you need to remove all tabbed spacing to a single space.

Which of the following option provides a command that will do this?

A) tab -t 1 results001.txt

B) cat 1 -t results001.txt

C) expand -t 1 results001.txt

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Complete the command to return only lines that contain the % symbol from currency.txt.

________ currency.txt

A

fgrep “%”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Complete the code to break the contents of the text file results001.txt into 2000 byte chunks.

rootSdefcian : /tes::# _______ results001.txt

A

split -b2000

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following commands will suspend the process with a PID 17528 PID without shutting down the program attached to the PID?

A) kill -s stop 17528

B) kill -s pgrep 17528

kill -9 17528

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What do you add to a command to make the specified task run in the background?

A) 2>

B) &

C) bg

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which of the following commands will suspend the process with a PID 17528 PID without shutting down the program attached to the PID?

A) kill -s stop 17528

B) kill -s pgrep 17528

C) kill -9 17528

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following value represents what priority is recommended for that process to run on the machine?

A) PR

B) NI

C) ps 1

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Complete the code to return the contents of the text file results001. in hexadecimal format.

root@debian:/ # ______ results001.txt

A

od -h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Complete the following command to return only the lines that do not contain the string dub from capitals. txt. The query should ignore the casing of the letter “d”.

grep ________ capitals.txt

A

-v [Dd]ub

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Complete the following command to start gedit in the background with a nice value of 8.

nice _____ &

A

-n 8 gedit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

You’ve been downloading some very large video files overnight using a Linux session, PID number 1127, running in the background, and having now logged back in the following morning you want to reconnect to that session.

Complete the following command to do this.

screen _____

A

-r 1127

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

You want to look at the most recent entries into a log file, mylog.txt which you know is quite long. You know the entries you want to see are in the last 4 lines.

Complete the query to return this information

______ mylog.txt

A

tail -4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Complete the following command to reset the nice value of the process with a PID of 21587 from its default value of 0 to 15.

_______ 15 21587

A

renice -n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly