Shared Flashcard Set

Details

Quiz 2 Chapter 3-4
Quiz 2 Chapter 3-4 study guide
70
Computer Science
Undergraduate 2
03/08/2016

Additional Computer Science Flashcards

 


 

Cards

Term
For some languages, such as Chinese, the ASCII character set is preferred instead of the Unicode character set.
Definition
False
Term
Emacs is a screen editor.
True or False
Definition
True
Term
In vi, a tilde (~) precedes all line-oriented commands.
True or False
Definition
False
Term
Emacs is a modal editor.
True or False
Definition
False
Term
Like the vi editor, Emacs lets you search for specific text.
True or False
Definition
True
Term
UNIX/Linux store data, such as letters, product records, or vendor reports, in flat ASCII files.
True or False
Definition
True
Term
The command rmdir can be used to delete a directory that is not empty.
True or False
Definition
False
Term
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 or False
Definition
False
Term
When you use the paste command, by default, the pasted results appear in columns separated by commas.
True or False
Definition
False
Term
You can complete a project using awk that you cannot complete using a combination of paste, cut, sort, and join.
True or False
Definition
True
Term
The exclusive use of 0s and 1s as a way to communicate with the computer is known as ____ language.
a. mathematical c. binary
b. logical d. machine
Definition
D.machine
Term
The ASCII character set represents ____ characters.
a. 256 c. 16,384
b. 512 d. 65,536
Definition
A. 256
Term
Compiled and interpreted files that can be run are called ____ program files.
a. binary c. assembly
b. executable d. dynamic
Definition
B. executable
Term
Insert mode, which lets you enter text, is accessed by typing the letter ____ after the vi editor is started.
a. “e” c. “d”
b. “i” d. “n”
Definition
B. “i”
Term
The vi editor’s ____ mode is started by pressing Esc.
a. edit c. ex
b. insert d. command
Definition
D. command
Term
You can access vi’s ex mode by pressing Esc, and then typing a(n) ____ to enter extended commands at the bottom of the screen.
a. colon (:) c. tilde (~)
b. semicolon (;) d. exclamation sign (!)
Definition
A. colon (:)
Term
When editing a text file with vi, if you want to save your changes and exit right away, you can use ____ or ZZ from command mode.
a. :wq c. :se
b. :q! d. :sq
Definition
A. :wq
Term
Using ____ plus a command-line command enables you to start a new shell, run the command, and then go back into the vi editor.
a. :q c. :c
b. :! d. :$
Definition
B. :!
Term
The ____ Emacs command is used to mark the cursor location.
a. Ctrl + @ c. Ctrl + <

. Ctrl + > d. Ctrl+ m
Definition
A. Ctrl + @
Term
You can start Emacs by entering the ____ command in the terminal window or at a command line in UNIX/Linux.
a. e c. emcs
b. em d. emacs
Definition
D. emacs
Term
You can use ____ to search backward in Emacs.
a. Alt+r c. Alt+b
b. Ctrl+r d. Ctrl+b
Definition
B. Ctrl+r
Term
You can view general Emacs documentation by entering ____ (press this one or two times) while you are in Emacs.
a. Alt+? c. Alt+h
b. Ctrl+? d. Ctrl+h
Definition
D. Ctrl+h
Term
You can use the ____ command to turn on the word wrap feature in Emacs.
a. Alt+w c. Alt+q
b. Ctrl+w d. Ctrl+q
Definition
C. Alt+q
Term
In UNIX/Linux, text files and binary files are considered to be ____ files.
a. executable c. regular
b. document d. dynamic
Definition
C. regular
Term
Character special files are used by input/output devices for communicating one character at a time, providing what is called ____ data.
a. raw c. ASCII
b. binary d. block
Definition
A. Raw
Term
System administrators and programmers refer to standard input as ____.
a. sin c. stdin
b. stin d. standardin
Definition
C. stdin
Term
System administrators and programmers refer to standard output as ____.
a. sout c. stdout
b. stout d. standardout
Definition
C. stdout
Term
You can use the ____ operator to redirect commands or program error messages from the screen to a file.
a. 1> c. 3>
b. 2> d. 4>
Definition
B. 2>
Term
The command > accountsfile ____.
a. deletes de file accountsfile
b. is not valid in UNIX/Linux systems
c. displays the contents of the file accountsfile on the screen
d. creates an empty file called accountsfile
Definition
D. creates an empty file called accountsfile
Term
You can use the ____ command to create empty files.
a. touch c. make
b. create d. null
Definition
A. touch
Term
When you no longer need a file, you can delete it using the ____ command.
a. rm c. dl
b. remove d. delete
Definition
A. rm
Term
When you no longer need a directory, you can use command ____ to remove it.
a. xtree c. dldir
b. rmdir d. deltree
Definition
B. rmdir
Term
The cp ____ option creates a symbolic link or name at the destination rather than a physical file.
a. -s c. -l
b. -y d. -n
Definition
A. -s
Term
To move a file, you use the ____ command along with the source file name and destination name.
a. rm c. mv
b. rename d. move
Definition
C. mv
Term
The ____ option of the find command displays files that have been changed within the last n minutes.
a. -min n c. -nmin n
b. -cmin n d. -mmin n
Definition
D. -mmin n
Term
The ____ option of the find command displays files that have been changed within the last n days.
a. -cdays n c. -mdays n
b. -ctime n d. -mtime n
Definition
D. -mtime n
Term
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.
a. -display c. -show
b. -print d. -names
Definition
D. -names
Term
If you execute ____, the contents of file1 are sorted and the results are stored in file2.
a. sort file1 -o file2 c. sort file1 > file2
b. sort file1 -d file2 d. sort file1 file2
Definition
C. sort file1 > file2
Term
A sorting ____ is a field position within each line.
a. index c. column
b. key d. position
Definition
B. column
Term
To run the myscript shell script located in the current directory, you should enter: ____.
a. start myscript c. run myscript
b. /.myscript d. ./myscript
Definition
D. ./myscript
Term
A binary digit, called a(n)________ for short, is in one of two states.
Definition
bit
Term
The term _____ is the abbreviation for binary term.
Definition
Byte
Term
Graphics files include bit patterns—rows and columns of dots called a(n)_____—that must be translated by graphics software into an image
Definition
bitmap
Term
_____ special files are related to devices, such as disks, and send information using blocks of data.
Definition
Block
Term
When UNIX/Linux detect errors in processing system tasks and user programs, they direct the errors to ______, which, by default, is the screen.
Definition
stderr
Term
Although the touch command cannot alter a file’s _______ changed date and time, it can alter the file’s access and modification dates and times.
Definition
inode
Term
The _______ option of the paste command causes files to be pasted one after the other instead of in parallel.
Definition
-s
Term
You can use the _____ command to remove specific columns or fields from a file.
Definition
awk
Term
You can use the ______ command to sort a file’s contents alphabetically or numerically.
Definition
sort
Term
You can use the _____ command to associate lines in two files on the basis of a common field in both files.
Definition
join
Term

in Emacs, cancels the current command 

 

a. Ctrl+g

b. Alt+w

c. dd

d. yy

e. dot (.)

f. /

g. $

h. x

 i. k

 
Definition
A. Ctrl+g
Term

used in vi to move up one line 

 

a. Ctrl+g

b. Alt+w

c. dd

d. yy

e. dot (.)

f. /

g. $

h. x

 i. k

Definition
I. k
Term

used in Emacs to scroll up one screen 

 

a. Ctrl+g

b. Alt+w

c. dd

d. yy

e. dot (.)

f. /

g. $

h. x

 

 i. k

Definition
H. paste
Term

used in vi to delete the text at the cursor 

 

a. Ctrl+g

b. Alt+w

c. dd

d. yy

e. dot (.)

f. /

g. $

h. x

 

 i. k

Definition
C. dd
Term

used in vi to copy lines 

 

a. Ctrl+g

b. Alt+w

c. dd

d. yy

e. dot (.)

f. /

g. $

h. x

 

 i. k

Definition
D. >
Term

used in vi to search forward for a pattern of characters

 

a. Ctrl+g

b. Alt+w

c. dd

d. yy

e. dot (.)

f. /

g. $

h. x

 

 i. k

Definition
F. -i
Term

acts as a wildcard for one character in vi

 

a. Ctrl+g

b. Alt+w

c. dd

d. yy

e. dot (.)

f. /

g. $

h. x

 

 i. k

Definition
E. -d
Term

this option prevents the touch command from creating a file, if it does not already exist

 

a. Ctrl+g

b. Alt+w

c. dd

d. yy

e. dot (.)

f. /

g. $

h. x

 

 i. k

Definition
C. -c
Term

combines files side by side

 

a. Ctrl+g

b. Alt+w

c. dd

d. yy

e. dot (.)

f. /

g. $

h. x

 

 i. k

Definition
H. paste
Term

option of the cut command used to indicate that a specific character separates the fields

 

a. Ctrl+g

b. Alt+w

c. dd

d. yy

e. dot (.)

f. /

g. $

h. x

i. k

 

Definition
E. -d
Term
What is ASCII?
Definition
An acronym for American Standard Code for Information Interchange, a standard set of bit patterns organized and interpreted as alphabetic characters, decimal numbers, punctuation marks, and special characters. The code is used to translate binary numbers into ordinary language, and, therefore, makes information stored in files accessible. ASCII can represent up to 256 characters (bit patterns).
Term
What is “compiling”?
Definition
A process of translating a program file into
machine-readable language.
Term
What is a text editor?
Definition
A simplified word processor used to create
and edit documents but that has no formatting features
to boldface or center text, for example.
Term
How can you save a file without exiting vi?
Definition
w!
Term
How can you turn on line numbering in vi?
Definition
set number
Term
How is “copy and paste” and “cut and paste” performed in vi?
Definition
yy = copy line
dd = cut line
p = paste
Term
What is a macro?
Definition
A set of commands that automates a complex
task. A macro is sometimes called a superinstruction.
Term
What is a fixed-length record?
Definition
A record structure in a file in
which each record has a specified length, as does each
field in a record.
Term
What is the purpose of entering the following command?
cp designs/* duplicates
Definition
to copy all files in the design directory to the duplicates directory
Term
What is a shell script?
Definition
A text file that contains sequences of
UNIX/Linux commands that do not need to be converted
into machine language by a compiler.
Supporting users have an ad free experience!