BIT 170 Quiz 3 Chapter 3
Which of the following key combinations, commonly used in the vi editor command mode, displays current line statistics?
Ctrl+g
In the GNU Emacs editor, what key combination can be used to delete all characters between the cursor and the end of the line?
Ctrl+k
The LISP artificial intelligence programming language can be used with which text editor below?
Emacs editor
If enough unique letters of a directory name have been typed, what key can be pressed to activate the BASH shell's completion feature?
Tab
What command can be used to display the last five lines of a text file?
[1-4]
What two regular expression characters can be used to match the characters at the beginning or end of a line, respectively?
^ $
To display the contents of a text file called data, what command should be used?
cat data
In order to move from the /home/joe/test/data to the /home/joe directory, what command below should be issued?
cd ../..
In vi, using command mode, what series of key presses below will cause the line on which the cursor is on to be deleted?
dd
What command can be issued to confirm what directory you are in at a command line prompt?
pwd
To display a text file in reverse order, what command should be used?
tac
What command can be used to display the last five lines of a text file?
tail -5
In what mode does the vi editor open by default?
command mode
What command is most effective at identifying different types of files?
file
What two characters below should not be used in filenames?
$ *
Select the regular expression metacharacter that matches 0 or more occurrences of the previous character.
*
Which switch below can be added to the ls command to show a list of files and their type?
-F
At the vi command mode prompt, what key combination below will force a quit from the vi editor without saving changes?
:q!
When issuing the ls -F command, what special character indicates a linked file?
@
Select the command below that can be used to provide a long listing for each file in a directory:
ls -l
Select below the command and the associated alias available on most Linux systems that displays a long listing for each file in a directory?
ls -l, ll
When displaying a large text file, what two commands provide the ability to show text in a page by page fashion?
more, less
Which character(s) below represent extended regular expression metacharacter(s)?
{}
What metacharacter can be used to refer to the current user's home directory?
~
Select the two filename extensions that are associated with C++ programming language source code files:
.cc, .cpp