Please Login or Register

Knowledgebase

Linux/Unix Command: mkdir - Make Directory

 

mkdir - Make Directory

CODE:
$ mkdir [options] [newdir]

The mkdir command is used to create a new directory on your server via SSH.

For example:

CODE:
$ mkdir /newdir

Will create a new directory called newdir in /.

CODE:
$ mkdir -m 444 /newdir

Using the "-m" (mode) option when creating the new directory will set the new directory with "444" (Read-only) permissions.

CODE:
$ mkdir -p /a/new/dir

Using the "-p" (parents) option means when creating the directory it will also create the parent directories if they do not exist.

Options:

-m--mode=MODE
set permission mode (as in chmod), not rwxrwxrwx - umask
-p--parents
no error if existing, make parent directories as needed
-v--verbose
print a message for each created directory
--help
display this help and exit
--version
output version information and exit

 






Was this answer helpful?
Add to Favourites Add to Favourites   Print this Article Print this Article
Also Read

Powered by WHMCompleteSolution

Language:


Web Hosting
Client Login
Web Hosting

Email

Password

Remember Me


Web Hosting
Search
Web Hosting




Follow Us on Twitter