Which command creates a new directory?

Study for the AP Networking Test. Use flashcards and multiple-choice questions for effective learning. Equip yourself with hints and explanations to ensure exam success. Get ready to excel!

Multiple Choice

Which command creates a new directory?

Explanation:
Creating a new directory is done with the mkdir command. mkdir stands for “make directory” and you provide the name of the directory you want to create, for example, mkdir projects will create a subdirectory named projects in the current location. If you need to create a whole path of directories, you can use mkdir -p path/to/newdir, which builds any missing parent directories along the way. The other commands shown have different tasks: copying files with cp, moving or renaming with mv, and listing contents with ls, none of which create directories.

Creating a new directory is done with the mkdir command. mkdir stands for “make directory” and you provide the name of the directory you want to create, for example, mkdir projects will create a subdirectory named projects in the current location. If you need to create a whole path of directories, you can use mkdir -p path/to/newdir, which builds any missing parent directories along the way. The other commands shown have different tasks: copying files with cp, moving or renaming with mv, and listing contents with ls, none of which create directories.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy