Linux Chapter 3

Ace your homework & exams now with Quizwiz!

When using the vi text editor, which of the following keys, when in command mode, will move to the last line in the document?

G

When using the vi text editor, which of the following keys, when in command mode, will change to insert mode and place the cursor at the end of the current line?

i

When issuing the ls -F command, what special character indicates a linked file?

@

At the vi command mode prompt, what key combination will force a quit from the vi editor without saving changes?

:q!

Chase is trying to extract records for employees 423 through 428 out of a comma separated values file and store them in another one. Which of the following commands would accomplish this? (Choose all that apply.) a. grep "42[3-8]" employees.csv > employees-newhires.csv b. grep "42[3-8]" < employees.csv > employees-newhires.csv c. cat employees.csv | grep 423,424,425,426,427,428 > employees.csv d. cat employees.csv | grep "42[3-8]" > employees-newhires.csv

a. b. d.

Jo has received a text file which contains multiple instances of his name spelled correctly as well as multiple instances spelled as Joe. Which of the following commands would search a text file for any occurrences of either spelling and display them out to the terminal? (Choose three.) a. grep "Joe*" document1.txt b. grep -E "Joe*" document1.txt c. grep "Joe?" document1.txt d. grep -E "Joe?" document1.txt

a. b. d.

Which of the following commands will not interpret regular expressions, which translates into faster results being returned? (Choose all that apply.) a. egrep b. fgrep c. grep -F d. grep

b. c.

In order to move from the /home/joe/test/data to the /home/joe directory, what command should be issued?

cd ../..

Which of the following key combinations, commonly used in the vi editor command mode, displays current line statistics?

ctrl + g

Kate wants to compare two text files to identify what might have been changed from one version to another. Which of the following commands can she use to do this?

diff document1.txt document2.txt

Select the command that can be used to provide a long listing for each file in a directory:

ls -l

Mike has changed directory into one subdirectory after the next and has lost track of where he's at in the directory tree. Which of the following commands can he use to tell him the full path to the current subdirectory he is in?

pwd

What command can be issued to confirm which directory you are in at a command line prompt?

pwd

What command is most effective at identifying different types of files?

stat

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

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


Related study sets

Psychology Ch. 1, Psychology Ch. 2, Psychology Ch. 3, Psychology Ch. 4, Psychology Ch. 5, Psychology Ch. 6, Psychology Ch. 7, Psychology Ch. 8, Psychology Ch. 9, Psychology Ch. 10, Psychology Ch. 11, Psychology Ch. 12, Psychology Ch. 13, Psychology C...mm

View Set

1/8 21ST LIT REVIEWER hhahaha........just like.... 29th slide of module 1 fr fr man

View Set

Health Assessment Exam 2 Study Questions plus SATA

View Set

CH 24. Nutrition, Metabolism, & Energy Balance

View Set

Quiz 1: The World of the Early Church

View Set

AP WORLD 2.5-2.7 college board quiz

View Set

Math 119 Test #1 -- PreRequisite Test

View Set

Infrastructure and Documentation/ Network Architecture

View Set

Entrepreneurship and Innovation Test #1

View Set