Linux 3

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

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

A special device file is used to ___________.

represent hardware devices such as hard disk drives and ports

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

pwd

Select the regular expression metacharacter that matches 0 or more occurrences of the previous character.

*

Which of the following is an absolute pathname?

/home/resume

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!

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 vi editor can function in which two of the following modes?

Command and Insert

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

Crl + g

The less command offers 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 file in the current directory

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 a user switch from insert mode to command mode when using the vi editor?

Pres the esc key

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

The first 10 lines of the file mary

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

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

True

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

True

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

cd ../..

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

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

The tac command _________.

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

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

filea, 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 "(John|Bob)" salesemployees.csv

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? grep "Joe?" document1.txt grep -E "Joe?" document1.txt grep "Joe*" document1.txt grep -E "Joe*" document1.txt

grep -E "Joe*" document1.txt

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

ls -I

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


Kaugnay na mga set ng pag-aaral

Linux Shell 3 Processes and Jobs

View Set

Module 23: Electric Potential Energy and Electric Potential

View Set

ACC202 Intermediate Accounting II Chapter 14 Smartbook

View Set

ATI Urinary Elimination - practice assessment

View Set

Personal Lines Insurance - Chapter 4

View Set

Chapter 33: Alterations in Cognition and Mental Health

View Set