mkdir -
This command is used to create a directory. You can say a directory is a simple folder, like we know in Windows.
E.g. - mkdir mydirectory
Above command will simply creates a directory with name 'mydirectory' in the directory which you are present in. You can also create one or more directories at a time for that you just need to enter the names of directories which you want to create with <space> separation.
syntax - mkdir <directory_name>
Options-
-m, --mode:
With this option you can set permissions while creating directory as you set or change permissions by using chmod.
E.g. - mkdir -m 666 new_dir
This will create a new_dir with 666 permissions.
-p, --parents:
You can make parent directory or its sub directories with help of this option.
E.g. - mkdir -p dir1/dir2
This will create a dir1 and also creates dir2 in dir1. It will newly creates both directories even if parent directory (here dir1) is not exist.
-v, --verbose:
This option will simply displays a message for each directory created.
This command is used to create a directory. You can say a directory is a simple folder, like we know in Windows.
E.g. - mkdir mydirectory
Above command will simply creates a directory with name 'mydirectory' in the directory which you are present in. You can also create one or more directories at a time for that you just need to enter the names of directories which you want to create with <space> separation.
syntax - mkdir <directory_name>
Options-
-m, --mode:
With this option you can set permissions while creating directory as you set or change permissions by using chmod.
E.g. - mkdir -m 666 new_dir
This will create a new_dir with 666 permissions.
-p, --parents:
You can make parent directory or its sub directories with help of this option.
E.g. - mkdir -p dir1/dir2
This will create a dir1 and also creates dir2 in dir1. It will newly creates both directories even if parent directory (here dir1) is not exist.
-v, --verbose:
This option will simply displays a message for each directory created.
No comments:
Post a Comment