ITN 171 Exam 2 (unedited)

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

When using the printf function, ____ indicates that the output is to appear in decimal digits. %i -i %d -d

%d

The ____ option of the diff command does not compare for blank lines. -b -B -c -C

-B

The ____ option of the diff command ignores blanks that repeat. -b -B -c -C

-b

The ____ option of the diff command shows lines surrounding the line that differs. -d -D -c -C

-c

this option prevents the touch command from creating a file, if it does not already exist paste -i > (gt;) -t -u -d -r -c -name

-c

The ____ option of the paste command is used to specify a different separator as a delimiter. -t -o -d -s

-d

option of the cut command used to indicate that a specific character separates the fields paste -i > (gt;) -t -u -d -r -c -name

-d

option of the cp command that provides a warning before an existing file with the same name is overwritten paste -i > (gt;) -t -u -d -r -c -name

-i

The ____ option of the find command displays files that have been changed within the last n minutes. -min n -cmin n -nmin n -mmin n

-mmin n

The ____ option of the find command displays files that have been changed within the last n days. -cdays n -ctime n -mdays n -mtime n

-mtime n

is an option of the find command paste -i > (gt;) -t -u -d -r -c -name

-name

When you use find, it is useful to note that some UNIX versions require the ____ option after the file name to display the names of files. -display -print -show -names

-print

when deleting a directory with rm, this option is used to recursively delete its files and subdirectories paste -i > (gt;) -t -u -d -r -c -name

-r

The cp ____ option creates a symbolic link or name at the destination rather than a physical file. -s -y -l -n

-s

option of the sort command used to indicate that a specific character separates the fields paste -i > (gt;) -t -u -d -r -c -name

-t

The ____ option of the uniq command instructs it to generate as output only the lines of the source file that are not duplicated successively. -d -s -o -u

-u

option of the mv command that overwrites a destination file with the same name, if the source file is newer than the one in the destination paste -i > (gt;) -t -u -d -r -c -name

-u

The ____ option of the grep command displays only lines that do not contain the search pattern. -v -n -o -r

-v

The ____ option of the diff command is used to display the differences side-by-side in columns. -s -c -n -y

-y

One way to run a shell script is to make it executable by using the x permission and then typing ____ prior to the script name when you run the script itself. ./ /. . ..

./

compares sorted files and shows differences selects lines or rows counts characters, words, or lines in a file selects columns (fields) compares and selects differences in two files formats and prints edits data streams sorts and merges multiple files translates and deletes character by character

1. comm 2. grep 3. wc 4. cut 5. diff 6. pr 7. sed 8. sort 9. tr

By default, pr formats the specified files into single-column pages of ____ lines. 22 33 55 66

66

can be used with cat to combine the contents of two files paste -i > (gt;) -t -u -d -r -c -name

> (gt;)

____ is a full-featured programming language. Sed Awk Emacs Grep

Awk

A popular use of pr is to convert lowercase characters to uppercase characters. True False

False

Shell scripts run more quickly than compiled programs. True False

False

The command rmdir can be used to delete a directory that is not empty. True False

False

When using wc, you cannot specify all three options (-l, -w and -c) in the command line at the same time. True False

False

When you are moving files, using the -o option with the mv command can be a good idea so that you don't unexpectedly overwrite a destination file with the same name. True False

False

When you use cat to combine two files into a third file, the first line of the output contains the first line of the first file followed by the first line of the second file. True False

False

You can use the < operator to redirect a command's output from the screen to a file. True False

False

Chapter 5 Quiz

From Chapter 5 Practice Quiz

Chapter 6 Quiz

From Chapter 6 Practice Quiz

Chapter 4 Quiz

From two Chapter 4 Practice Quiz

You can use the ____________________ command to associate lines in two files on the basis of a common field in both files.

Join?

Bash is a freeware derivative of the Bourne and ____ shells. Korn C csh tsh

Korn

Moving and renaming a file are essentially the same operation. True False

True

The pipe operator can connect several commands on the same command line. True False

True

UNIX/Linux store data, such as letters, product records, or vendor reports, in flat ASCII files. True False

True

You can use the less command with a directory to view its contents one screen at a time, such as less /sbin. True False

True

You can use the vi editor to create script files. True False

True

To append new lines in sed, you must use the ____ command a\ -a \a &gt;a

a\

The ____ command is used to look for patterns in files. awk find pattern search

awk

The ____ command locates identical lines within two identically sorted files. diff sed uniq comm

comm

When you assign a value to a variable, you might want to evaluate it by displaying its contents via a(n) ____ operator. definition echo evaluating print

evaluating

By default, each page in the output of pr has a ____-line header, which, by default, contains the current file's name, its last modification date, the current page, and a trailer consisting of blank lines. three four five six

five

You use the ____ command to search for a specified pattern in a file, such as a particular word or phrase. find grep sed diff

grep

A sorting ____ is a field position within each line. index key column position

key

The join command is used to associate information in two different files on the basis of a common field or ____ in those files. index link column key

key

To redirect the list of the files in a directory to a file called homedir.list, you enter ____. ls < homedir.list ls > homedir.list homedir.list < ls homedir.list > ls

ls > homedir.list

To move a file, you use the ____ command along with the source file name and destination name. rm rename mv move

mv

combines files side by side paste -i > (gt;) -t -u -d -r -c -name

paste

The ____ redirects the output of one command to the input of another command. output redirection operator (&gt;) input redirection operator (&lt;) pipe operator (|) tilde (~)

pipe operator (|)

You use the ____ character in script files to mark comments. tilde (~) dollar ($) pipe (|) pound (#)

pound (#)

The ____ command prints a listing of environment and configuration variables. printenv printvar printf bash

printenv

The ____ function within the awk command is used to format output. out outln print printf

printf

Character special files are used by input/output devices for communicating one character at a time, providing what is called ____ data. raw binary ASCII block

raw

In UNIX/Linux, text files and binary files are considered to be ____ files. executable document regular dynamic

regular

When you no longer need a file, you can delete it using the ____ command. rm remove dl delete

rm

When you no longer need a directory, you can use command ____ to remove it. xtree rmdir dldir deltree

rmdir

____ is NOT a selection command. comm diff grep sed

sed

When you create a shell script to run in Bash, you can immediately run the script by typing ____ and then the name of the script. run sh start exec

sh

You can use the ____________________ command to sort a file's contents alphabetically or numerically.

sort

If you execute ____, the contents of file1 are sorted and the results are stored in file2. sort file1 -o file2 sort file1 -d file2 sort file1 &gt; file2 sort file1 > file2 sort file1 file2

sort file1 > file2

System administrators and programmers refer to standard output as ____. sout stout stdout standardout

stdout

The paste command normally sends its output to ____. stdout null stderr the file indicated as an argument

stdout

A ____ is a name consisting of letters, numbers, or characters and is used to reference the contents of a variable. comment symbolic name label tag

symbolic name

You can use the ____ command to create empty files. touch create make null

touch

The ____ command is useful when you want your shell program to automatically remove any temporary files that are created when the shell script runs. set export tput trap

trap

The ____ command removes duplicate lines from a file. grep dup uniq diff

uniq

____ is a selection command. uniq awk sort sed

uniq


Ensembles d'études connexes

Chapter 5:Underwriting and Policy Issue

View Set

Health Policy: Factors Affecting Health Care Costs

View Set