Linux Test 2 Multiple choice

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

(Refer to the image) You still want to delete the directory even though it contains files. What command would you enter?

rm -r

The following files exist in the current directory. jan1 jan3 jan5 jan7 jan9 jan22 jan29 Which command would remove the files jan1 jan3 jan5 jan7?

rm jan[1-5]

Using the touch command on an existing file will update the file's

timestamp

By default, the command ls list files of the current directory. True-False.

true

True-False. The type command can be used to identify commands that are built into the shell.

true

the command ls . results in a list of files in the current directory.

true

Fix .

whereis

The _________ command shows the location of the real command.

which

In an expression (pattern) to search for text. The ___ character represents any character.

.

True-False: To find files which are larger than 1MB in size, the following command could be used. find / -size +1MB

True

The anchor character ______ is used to ensure that a pattern appears at the beginning of the line. (used with grep command)

^

The command: ls ???[1-3] would result in display all thesetouch filenames EXCEPT:

badone

The command cp -r:

copies the contents of a directory including any subdirectories and thier contents.

The command: grep "cre*" clowns.txt would display lines of text from the clowns.txt file that contained the words ______. Select 2.

creepy creating

Which character at the beginning of a long listing indicates a directory?

d

The command: echo d*n* would result in displaying all of the following filenames EXCEPT

doolittle

True-False. The following command will execute without error. mv file1

false

What information is displayed using the command; ls -l

file contents

The __________ command can be used to search for files in the filesystem. Unlike the locate command which searches only for files based on filename, this command offers options that allow for searching for files owned by a user or files modified less than 3 days ago.

find

The command: ls *down is entered. Which of the following filenames would the pattern result in displaying? (select all that are correct). Could be all answers.

hoedown slapdown throwdown touchdown

The _______________ command is useful for searching for a file within the file system. The command uses a database.

locate

The user is in their home directory. What was entered at the command prompt to create the output displayed.

ls . test

To copy the contents of a directory, use the following options for the cp command (choose two).

-r -R

Which of the following is NOT used for globbing?

#

The anchor character ______ is used to ensure that a pattern appears at the end of the line.

$

Which option for the rm command will cause it to prompt before deleting files?

-i

What option should be used with the mkdir command to create the parent directories for any child directories about to be created?

-p

The command: echo D?* will search for

All files with names beginning with D and having at least one more character.

By default, what does the cp command preserve from the original file? Example of copy command: cp test.txt exam.txt

The contents

The ls-l command output will NOT show:

File contents

Which the two lines of text would display as a result of the command: grep [1-9]* quotesofteens.txt

Her text said "no eating b4 lunch" Wait one minute", she said.


Conjuntos de estudio relacionados

Lesson 3 & Electrical Quantities and Ohm's Law

View Set

MGMT Ch 13 - Contract Performance, Breach, and Remedies

View Set

Neuromuscular Disorders: DMD and BMD

View Set

kjanatomy- ch. 1- 4 anatomical planes

View Set

Chapter 18: Negotiable Instruments: Transferability and Liability

View Set

Systems-Based Emergency Medicine Course Objectives: Cardiovascular Emergencies PA 605 ER

View Set