Linux+ 2.3

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

You need to search through a large text file and find any record that contains either Luke or Laura at the record's beginning. Also, the phrase Father is must be located somewhere in the record's middle. Which of the following is an ERE pattern that could be used with the egrep command to find the record?

"(^Luke | ^Laura).*Father is.*"

By default, STDOUT goes to what item?

/dev/tty

A unicode-encoded text file needs to be perused. Before you decide what utility to use in order to view the file's contents, you employ the wc command on it. This utility displays 2020 6786 11328. How many lines, words, and bytes does it have?

2020 lines, 6786 words, 11328 bytes

Which of the following best defines a file descriptor?

A number that represents a process' open files

The grep utility can employ regular expressions in its pattern. Which of the following best describes a regular expression?

A pattern template you define for a utility, which uses the pattern to filter text

The cat -E myFile.txt is entered, and the end of every line is displayed as a $. What does this mean?

ASCII LF character

You want to edit the file space.txt and decide to use vim. Which modes might you use?

Edit, Command, Insert, Ex

The cut utility often needs delimiters to process text records. Which of the following best describes a delimiter?

One or more characters that create a boundary between different data items in a record

What does the tee command do?

Output from STDIN to STDOUT and a file

Which of the fllowing is a BRE pattern that could be used with the grep command? Sp?ce, "Space, the .* frontier", ^Space, (lasting | final), frontier$

all but (lasting|frontier)

You want to find a file named 42.tmp which exists somewhere in your current directory and display it to stdout. Which of the following commands will do this? a. xargs (find . -name 42.tmp) cat b. cat `find . -name 42.tmp` c. cat $(find . -name 42.tmp) d. find . -name 42.tmp | xargs cat

b,c,e

Which of the following commands can display the data.txt and datatoo.txt files content one after the other to STDOUT?

cat -n data.txt datatoo.txt, sort data.txt datatoo.txt

You have a text file which contains information concerning the monitors used within the data center. Each record ends with the ASCII LF character and fields are deliminated by a comma. A text record has the monitor ID, manufacture, serial number, and location. To display each data center monitor's monitor ID, serial number, and location, use which cut command?

cut -d "," -f 1,3,4 monitor.txt

You are a sysadmin on a centOS linux server. YOu need to view records in the /var/log/messages file that starts with the date May 30 and end with the IPv4 address ... Which of the following commands is the best grep command to use?

grep "May 30.*192.168.10.42" /var/log/messages

What command will determine how many records the file Problems.txt contain the word error?

grep error Problems.txt | wc -l

A text file, StarGateAttacks.txt, needs to be specially formatted for review. Which of the following commands is the best to accomplish that task quickly?

pr

A file data.txt needs to be sorted numerically and its output saved to a new file newdata.txt. Which of the following commands can accomplish this task?

sort -n -o newdata.txt data.txt, sort -n data.txt > newdata.txt

Which of the following command will put any generated error messaged into the black hole?

sort space.txt 2> /dev/null

Which utilities can change text in a file?

vim, nano


संबंधित स्टडी सेट्स

Chapter 4-Tissue: The Living Fabric

View Set

Chapter 5 Membranes Reading Questions Sections 1-3 mastering bio

View Set

Comparing a Function and Its Inverse

View Set

Nusr 114 Exam 1 Chapter 15 (assessing the head and neck) prepU

View Set