Updated: 11/04/2017 by Computer Hope
About mkdir
Syntax
mkdir [-m= mode ] [-p ] [-v ] [-Z= context ] directory [directory ...] mkdir --version mkdir --helpOptions
directory | The name of the directory to be created. If the specified directory
does not already exist, mkdir
creates it. More than one directory
may be specified. Mkdir -m a=rwx mydir Create the mydir directory, and set its file mode (-m ) so that all users (a ) may read (r ), write (w ), and execute (x ) it. For directories, this means that any user on the system may view ("read"), and create/modify/delete ("write") files in the directory. Any user may also change to ("execute") the directory, for example with the cd command. Chdir -m 777 mydir Same as the above command, but using a numerical file mode. Grants read, write, and execute permissions to the directory for all users. (For more information about file modes, see chmod ). Mkdir -p /home/hope/Documents/pdf Creates the directory /home/hope/Documents/pdf . If any of the parent directories /home , /home/hope , or /home/hope/Documents do not already exist, they will automatically be created. |