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_namefor a single directory. - Use
mkdir -p path/to/directoryfor nested directories.
If you need more specific examples or have further questions, let me know!
