NOS 120 Chapter 3 Quiz

¡Supera tus tareas y exámenes ahora con Quizwiz!

Select the regular expression metacharacter that matches 0 or more occurrences of the previous character. Select one: a. * b. ? c. + d. ^

*

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? Select one: a. a b. I c. i d. A

A

If enough unique letters of a directory name have been typed, what key can be pressed to activate the BASH shell's completion feature? Select one: a. Ctrl b. Tab c. Alt d. Esc

Tab

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.) Select one or more: 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

cat employees.csv | grep "42[3-8]" > employees-newhires.csv grep "42[3-8]" employees.csv > employees-newhires.csv grep "42[3-8]" < employees.csv > employees-newhires.csv

Inorder to move from the /home/joe/test/data to the /home/joe directory, what command should be issued? Select one: a. cd ../.. b. cd ./.. c. /home/joe d. cd ..

cd ../..

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? Select one: a. compare document1.txt document2.txt b. match document1.txt document2.txt c. diff document1.txt document2.txt d. version --compare document1.txt document2.txt

diff document1.txt document2.txt

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.) Select one or more: a. grep "Joe?" document1.txt b. grep -E "Joe*" document1.txt c. grep -E "Joe?" document1.txt d. grep "Joe*" document1.txt

grep "Joe*" document1.txt grep -E "Joe?" document1.txt grep -E "Joe*" document1.txt

Garrett wants to search through a csv file to find all rows that have either the name John or Bob in them and display them out to the terminal. Which of the following commands could Garrett use to perform this search? Select one: a. egrep (John|Bob) salesemployees.csv b. grep -E (John|Bob) salesemployees.csv c. grep (John|Bob) salesemployees.csv d. grep -E "(John|Bob)" salesemployees.csv

grep -E "(John|Bob)" salesemployees.csv

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

grep -F fgrep

Select the command that can be used to provide a long listing for each file in a directory: Select one: a. ls -F b. ls -T c. ls -I d. ls -L

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? Select one: a. cwd b. pwd c. cd - d. ls -dir

pwd

What command can be issued to confirm which directory you are in at a command line prompt? Select one: a. dir b. whereami c. ld d. pwd

pwd

What command is most effective at identifying different types of files? Select one: a. stat b. file c. ll d. ls -l

stat

To display a text file in reverse order, what command should be used? Select one: a. cat b. tac c. tee d. sed

tac

What command can be used to display the last five lines of a text file? Select one: a. stop -5 b. tail -5 c. end -5 d. head -5

tail -5


Conjuntos de estudio relacionados

Government: Lesson 5 The U.S. in a Global Economy

View Set

N306 OB: WEEK 1-FOCUS FOR THE QUIZ 1

View Set

FIN: Ch 3 Working with Financial Statements

View Set