Which command creates a new directory?

Prepare for the AP Networking Test. Study with flashcards and multiple choice questions, each question includes hints and explanations. Boost your confidence and get ready for success!

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 Examzify

You can unsubscribe at any time. Read our privacy policy