mkdir create directory with files permission

 

Create directory with files permission using mkdir command

 

   To include the files permission when creating directory, execute the mkdir with option -m and the file permission mode.  If you already create the directory and want to change the files permission / directory permission mode, you may need to look into chmod command.  Please note that the example below create new directory and set permisson for the directory in one go...

 

Execute mkdir -m (permission mode) command

 

1.  Command example to create directory with directory permision 777 

 mkdir create directory with [ermission

[jason@fedora ~]$ mkdir -m 777 directory-example

[jason@fedora ~]$ 

 

2.  verify the creation of directory and the permission of the directory by executing ll command or use the ls -l command


[jason@fedora ~]$ ll

total 80

drwxr-xr-x.  3 jason jason 4096 Aug 11 00:45 Desktop

drwxrwxrwx.  2 jason jason 4096 Nov 14 01:04 directory-example

drwxr-xr-x.  2 jason jason 4096 Oct 24 07:54 Documents

...

 

 

Keywords:  mkdir directory permission, create directory permisson, create directory with permission, new directory with permission, create directory permission