CompTIA LINUX+ Advanced GNU and Unix Commands Flashcards
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
C
Complete the command to return only lines that contain the % symbol from currency.txt.
________ currency.txt
fgrep “%”
Complete the code to break the contents of the text file results001.txt into 2000 byte chunks.
rootSdefcian : /tes::# _______ results001.txt
split -b2000
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
What do you add to a command to make the specified task run in the background?
A) 2>
B) &
C) bg
B
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
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
B
Complete the code to return the contents of the text file results001. in hexadecimal format.
root@debian:/ # ______ results001.txt
od -h
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
-v [Dd]ub
Complete the following command to start gedit in the background with a nice value of 8.
nice _____ &
-n 8 gedit
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 _____
-r 1127
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
tail -4
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
renice -n