Chapter 3 Cumulative Review
used in vi to search forward for a pattern of characters
/
The ASCII character set represents ____ characters.
256
Unicode offers up to ____ characters.
65,536
Using ____ plus a command-line command enables you to start a new shell, run the command, and then go back into the vi editor.
:!
While you are working on a report in vi, you decide to insert information from another text file in your home directory called summary_data. Which of the following commands (from command mode) enables you to add the contents of summary_data?
:r summary_data
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.
:wq
You have been working on a long vi text file and now you've got to rush off to a meeting. How can you quickly save your work and exit the vi editor?
:wq, :ZZ, :x
You've just finished entering a one-page memo in Emacs and now want to quickly go to the beginning so you can reread it. What command enables you to quickly go to the beginning?
Alt+<
What is the name of a standardized bit pattern for characters and numbers that is used by most computer operating systems?
American Standard Code for Information Interchange (ASCII).
What is the process called compiling?
Compiling is a process of translating a program file into machine-readable language
You have just pressed Ctrl+x,Ctrl+s in the Emacs editor thinking that this will exit Emacs, but it seems like nothing has happened. What is the problem?
Ctrl+x,Ctrl+s is a command sequence that saves your file, but it does not cause Emacs to close.
How can you get help for using the vi editor?
From command mode enter :help. and d. From the regular command line outside of vi enter man vi.
You are using the vi editor to create a list of tasks on each line and you would like an easy way to number each line (task) listed in the file. Which of the following is an easy solution?
From command mode enter :set number.
You are in the vi editor and it's now noon. Everyday at noon you run a program called update, which updates a database. How can you run the program without closing your vi session?
From command mode type :!update and press Enter..
While editing a file in vi you realize that you have been spelling the word receive as recieve. How can you find all occurrences of your misspelled receive?
From command mode, type /recieve and press Enter.
You're editing a document using vi and you are near the end of a page. You want to quickly go back to the top of the page to check something you said. Which of the following command-line commands enables you to quickly go to the top of the page?
H
As you look over the shoulder of an employee who is using the vi editor, you see her use the command :l $s/capitol/capital. What does this command do?
It changes all instances of capitol to capital.
Which of the following are menus that you would find on the menu bar in Emacs?
Options, edit, and buffers
You have started Emacs without specifying a file name for the existing file you want to open. Is there a way to specify the file name and open the file after you've started Emacs, and if so how?
To open an existing file from Emacs, press Ctrl+x, Ctrl+f and provide the path to the file as well as the file name.
How can you print a file while you are in the vi editor?
To print a file while in the vi editor type :lpr filename and press Enter.
When you copy text in Emacs, you must mark the text you want to copy by using which of the following commands?
Use Ctrl+Spacebar to mark the beginning of the text and Alt+w to mark the end as well as to copy the text
Your colleague has written a line of text in vi and now wants to delete the line, but save its contents in a buffer in case he decides to bring back the line he deletes. What do you recommend?
While in command mode, move the cursor to the first character in the line and press dd.
You are using vi to edit a file and have just entered 12 new lines. You need to replicate the same 12 lines right after you enter them. What command-mode command can you type to replicate the lines? (Choose all that apply.)
a period
You are preparing to give a training session on the vi editor. How would you describe it? (Choose all that apply.)
a, It is modal., b. It is a text editor, c. Most UNIX/Linux distributions come with vi., and d. It is a screen editor.
The ____ Emacs command is used to move the cursor to the beginning of the file.
alt <
used in Emacs to scroll up one screen
alt w
The vi editor works in three modes: insert mode, ____ mode, and extended mode.
command
The vi editor's ____ mode is started by pressing Esc.
command
How can you find out information about the status of an editing session while in the vi editor?
ctl g
in Emacs, cancels the current command
ctrl g
You can view general Emacs documentation by entering ____ (press this one or two times) while you are in Emacs.
ctrl h
You've used Emacs to write advertising copy about a new software product your company has developed. Now you find out that the name of the product has been slightly. What command can you use to track down all references to the old name so you can locate them?
ctrl s
While working in the Emacs editor, you delete a section of text and then decide to undo your deletion. Which of the following commands should you use?
ctrl x, u
used in vi to delete the current line
dd
A byte consists of ____ binary digits.
eight
UNIX/Linux normally include two editors: vi and ____.
emacs
You can start Emacs by entering the ____ command in the terminal window or at a command line in UNIX/Linux.
emacs
When you started the vi editor, you forgot to specify the name for the new file you are creating. To save steps next time, how can you specify the name of a new file when you first start vi?
enter vi and the file na,e
Compiled and interpreted files that can be run are called ____ program files.
excutable
For some languages, such as Chinese, the ASCII character set is preferred instead of the Unicode character set.
false
used in vi to move up one line
k
The exclusive use of 0s and 1s as a way to communicate with the computer is known as ____ language.
machine
acts as a wildcard for one character in vi
period
used in vi to move to the end of the current line
period
Which of the following enables you to move the cursor to the left while you are in command mode in the vi editor?
press the left arrow key or k
____ are typically not compiled into machine code prior to running, but are executed through an interpreter.
scripts
Emacs is a screen editor.
true
Files that contain nonprintable characters, such as machine instructions, are called binary files.
true
Like the vi editor, Emacs lets you search for specific text.
true
used in vi to delete the text at the cursor
x
used in vi to copy lines
yy
In the vi editor, lines containing a(n) ____ are not part of the file; they indicate lines on the screen only.
~