Module 3 Test Prep and Questions

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which directory would a user jsmith look in to modify the scripts that are run specifically related to their login?

/home/jsmith/

Which of the following is an absolute pathname? (Choose all that apply.)

/home/resume, Home/resume, resume?

Which of the following keystroke combinations will exit the vi text editor? (choose two.)

:q and ZZ. Pressing shift and z twice (two capital Z's will exit the vi editor)

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?

A

The less command offer less functionality than the more command. True or False?

False

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

After typing the ls -a command, you notice a file whose filename begins with a dot ( . ). What does this mean?

It is a hidden file

After typing the ls -F command, you notice a filename that ends with an * (asterisk) character. What does this mean?

It is an executable file

How can you specify a text pattern that must be at the beginning of a line of text using a regular expression?

Precede the string with a ^.

How can a user switch from insert mode to command mode when using the vi editor?

Press the Esc key

A special device file is used to ___.

Represent hardware devices such as hard disk drives and ports

A user types the command head /poems/mary. What will be displayed on the on the terminal screen?

The first 10 lines of the file mary

A directory is a type of file. True or False?

True

Linux has only one root directory per directory tree. True or False?

True

Using wildcard meta characters, how can you indicate a character that is not an a or b or c or d?

[!a-d]

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.)

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

A user typed the command pwd and saw the output: /home/jim/sales/pending. How could that user navigate to the /home/jim directory?

cd ../..

If a user's current directory is /home/mary/project1, which command could she use to move to the etc directory directly under the root?

cd /etc

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?

d. diff document1.txt document2.txt

The tac command ___.

displays the contents of a file in reverse order, last line first and first line last

What will the following wildcard regular expression return: file [a-c]?

file a, fileb, filec

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?

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.)

grep -F , fgrep

Andrew wants to search a text file to find lines that match the type of data that he is looking for by using a regular expression. Which of the following commands could Andrew use to do this? (Choose all that apply.)

grep, egrep allows you to search for patterns using common regular expressions

The vi editor can function in which two of the following modes? (Choose both that apply)

insert, and command

Cameron is working at the command line and can see the name of the current subdirectory he is in, but wants to see the entire path and not just the current subdirectory name. Which of the following commands could he use to see that information?

pwd

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

Which command would user type on the command line to find out the current directory in the directory tree?

pwd

What will typing q! at the : prompt in command mode do when using the vi editor?

quit without saving any changes

If "resume" is the name of a file in the home directory off the root of the filesystem and your present working directory is home, what is the relative name for the file named resume?

resume

Which command searches for and displays any text contents of a binary file?

strings

Christine wants to watch the /var/log/syslog file in real time as he performs a few tasks on the server. Which of the following tasks will allow him to do this?

tail -f /var/log/syslog


Ensembles d'études connexes

Clinical Informatics Exam 1 Set 2

View Set

Macro Economics Chapter 10 Self Test

View Set

Unit 4 Assessment HBS 2.3 & 2.4 review

View Set

IK Intermediate 1 (3rd Ed) [Lesson 6]

View Set

Geografia - Geopolítica mundial: ENEM Geografia

View Set

Properties Used in Algebra and Geometry/Complex Number System

View Set