The mkdir command has several options that can modify its behavior. Here are some commonly used options:
-
-p: Create parent directories as needed. If the specified parent directory does not exist, it will be created.mkdir -p /path/to/directory -
-m: Set the file mode (permissions) for the new directory. You can specify the permissions in numeric (e.g.,755) or symbolic (e.g.,u=rwx,g=rx,o=rx) format.mkdir -m 755 my_directory -
-v: Verbose mode. This option will print a message for each directory that is created.mkdir -v my_directory -
--help: Display help information about themkdircommand and its options.mkdir --help -
--version: Display version information about themkdircommand.mkdir --version
These options can be combined as needed to customize the behavior of the mkdir command.
