Which command would you use to create a directory named 'logs'?

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 would you use to create a directory named 'logs'?

Explanation:
Creating a directory is done with the mkdir command, which stands for “make directory.” To create a folder named logs, you would run mkdir logs. This command is specifically for creating new directories, whereas other common commands do different tasks: mv moves or renames items, cp copies items, and ls lists the contents of a directory. If logs already exists, mkdir will error unless you use options like -p to create it only if it doesn’t exist or to create any necessary parent directories.

Creating a directory is done with the mkdir command, which stands for “make directory.” To create a folder named logs, you would run mkdir logs. This command is specifically for creating new directories, whereas other common commands do different tasks: mv moves or renames items, cp copies items, and ls lists the contents of a directory. If logs already exists, mkdir will error unless you use options like -p to create it only if it doesn’t exist or to create any necessary parent directories.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy