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

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 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 Passetra

You can unsubscribe at any time. Read our privacy policy