How do I create directories?

To create directories in a Unix-like operating system, you can use the mkdir command. Here are some common usages:

Basic Directory Creation

To create a single directory:

mkdir directory_name

Creating Nested Directories

To create a nested directory structure, use the -p option:

mkdir -p ~/project/digital_garden/projects/web_app/src/components

This command creates the entire path, including any parent directories that do not exist.

Summary

  • Use mkdir directory_name for a single directory.
  • Use mkdir -p path/to/directory for nested directories.

If you need more specific examples or have further questions, let me know!

0 Comments

no data
Be the first to share your comment!