Repeat exercise 5 using the file phone.gz, a compressed version of the list of names and phone numbers. Consider more than one approach to answer each question and explain how you made your choices.
What will be an ideal response?
You can either decompress the file using gunzip, giving the same commands
as in exercise 5 once the file is decompressed, or use zcat and a pipeline to
display the results without creating an intermediate file:
$ zcat phone.gz | grep "Ace Electronics"
$ zcat phone.gz | sort
$ zcat phone.gz | uniq
$ zcat phone.gz | sort -u
Which technique you use makes a significant difference only if phone.gz is
large, in which case it becomes an issue of what you are doing and making
a tradeoff between using more CPU (processor) time and less hard disk stor-
age, or vice versa.
When you are giving a single command one time only, using a pipeline is
more efficient. When you want to give more than one command or want to
give one command repeatedly, it is more efficient to decompress the file once
using gunzip and then process it repeatedly with grep, sort, or uniq, assuming
you have sufficient disk space. The most inefficient technique as far as disk
space goes and the most efficient as far as CPU (and your) time goes is to
put the output of grep, sort, or uniq in new files using a redirect output
symbol:
$ zcat phone.gz | sort > phone.sort
You might also like to view...
Fault tolerance.
For each of the following system attributes, describe how process migration can increase it in a system and an inefficient implementation reduce it.
The Performance Diagnostics Report is a pre-built report that contains an easy to understand summary of a computer's overall performance
Indicate whether the statement is true or false
A ____ is a partitioning of the ports on a VLAN-capable switch into LAN groups whose traffic is isolated from each other.
A. private LAN B. software LAN C. segmented LAN D. virtual LAN
________, which dates back to 1969, runs many of the world's most powerful servers.
A. Linux B. Unix C. Windows RT D. Mac OS