Managing Directories Flashcards Preview

Networking > Managing Directories > Flashcards

Flashcards in Managing Directories Deck (14):
1

In Linux, the command for making new directory is....?

the mkdir (make directory) command.

2

mkdir [OPTIONS] {DIRECTORY...}

Creates the DIRECTORY(ies), if they do not already exist. Fails with an error message if one or more of the DIRECTORY(ies) do exist, but remaining new directories are still created.

3

By default mkdir will not create a subdirectory if...?

the parent directory does not already exist.

4

mkdir -p (as in 'parent') can create...?

an entire directory tree at once.

5

by default, the ls command will only show the contents of...?

the top level directory.

6

if you would like the ls command to list subdirectories as well, you can add the...?

-R command line switch.
(Whenever a command iterates through a structure, operating on each element of the structure in the same manner as it operated on the topmost element, the command is said to act recursively. The -R command line switch specifies that the ls command should list with recursion.)

7

the ls -R can be combined with any of the previously learned command line switches, as well as, such as...?

ls -sR to include file sizes, or ls -IR to include file attributes.

8

the command for removing a directory is...?

rmdir (remove directory)

9

rmdir [OPTIONS] {DIRECTORY...}

Removes the DIRECTORY(ies), if they are empty. Fails with an error message if one or more of the DIRECTORY(ies) are not empty, but remaining (empty) directories are still removed. Note that a directory containing only a subdirectory is not empty.

10

Commands such as _____ and _____ succeed silently.

mkdir and rmdir

11

a directory tree can be copied with a single instruction...?

cp -r website archive.

12

a directory tree can be removed with ...?

rm -r website/media

13

the tree command will....?

recursively list the contents of the directory, much like the ls -R command. The output, however, is displayed more intuitively as an ASCII tree.

14

tree -d just shows...?

directories.