Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mkdir(1) [linux man page]

MKDIR(1)							   User Commands							  MKDIR(1)

NAME
mkdir - make directories SYNOPSIS
mkdir [OPTION]... DIRECTORY... DESCRIPTION
Create the DIRECTORY(ies), if they do not already exist. Mandatory arguments to long options are mandatory for short options too. -m, --mode=MODE set file mode (as in chmod), not a=rwx - umask -p, --parents no error if existing, make parent directories as needed -v, --verbose print a message for each created directory -Z, --context=CTX set the SELinux security context of each created directory to CTX --help display this help and exit --version output version information and exit AUTHOR
Written by David MacKenzie. REPORTING BUGS
Report mkdir bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report mkdir translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
mkdir(2) The full documentation for mkdir is maintained as a Texinfo manual. If the info and mkdir programs are properly installed at your site, the command info coreutils 'mkdir invocation' should give you access to the complete manual. GNU coreutils 8.5 February 2011 MKDIR(1)

Check Out this Related Man Page

MKDIR(1)							   User Commands							  MKDIR(1)

NAME
mkdir - make directories SYNOPSIS
mkdir [OPTION]... DIRECTORY... DESCRIPTION
Create the DIRECTORY(ies), if they do not already exist. Mandatory arguments to long options are mandatory for short options too. -m, --mode=MODE set file mode (as in chmod), not a=rwx - umask -p, --parents no error if existing, make parent directories as needed -v, --verbose print a message for each created directory -Z set SELinux security context of each created directory to the default type --context[=CTX] like -Z, or if CTX is specified then set the SELinux or SMACK security context to CTX --help display this help and exit --version output version information and exit AUTHOR
Written by David MacKenzie. REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report mkdir translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
mkdir(2) Full documentation at: <http://www.gnu.org/software/coreutils/mkdir> or available locally via: info '(coreutils) mkdir invocation' GNU coreutils 8.28 January 2018 MKDIR(1)
Man Page

13 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mkdir limitations

What characters can't be used with a mkdir? Any limits on length of name? Thank you, Randy M. Zeitman http://www.StoneRoseDesign.com (12 Replies)
Discussion started by: flignar
12 Replies

2. UNIX for Dummies Questions & Answers

Can't mkdir in /home

I've just loaded Solaris 5.7 on an Ultra 10 and I'm trying to mkdir in /home as root. I'm getting the following message: mkdir: Failed to make directory "test"; Operation not applicable When I do an ls -al on /home, I get: dr-xr-xr-x 1 root root If I do a df -ak, I get for... (5 Replies)
Discussion started by: leond
5 Replies

3. Solaris

cant make dir as root

not sure what the problem is, when I go to /home and enter command mkdir i get this error mkdir chris mkdir: Failed to make directory "chris"; Operation not applicable im root.... (3 Replies)
Discussion started by: csaunders
3 Replies

4. UNIX for Advanced & Expert Users

Problems with gnu make

I am running a make file through the gnu make tool and i am getting the following error jsh1035c:/users/egate453/admegate/kapil/samples $ make -f GNUmakefile queue_c make -f ./GNUmakefile queue_c in_objdir=1 build_root=/users/egate453/admegate/kapil/samples make: Entering directory... (2 Replies)
Discussion started by: handak9
2 Replies

5. Shell Programming and Scripting

How to perform comparision in unix

I am trying to perform a simple if/else check. if ; then mkdir /wdnet/oracletest else mkdir $CON_DIR fi I guess I don't understand the unix basics about comparisons. My scripts always executes the if, even though my CON_DIR variable is not blank. What am I doing... (5 Replies)
Discussion started by: artfuldodger
5 Replies

6. UNIX for Dummies Questions & Answers

What's the problem with the command of mkdir

The message is: #mkdir /home/ade mkdir:Failed to make directory "/home/ade",Operation not applicable. What's the problem? :mad: (3 Replies)
Discussion started by: new_hand
3 Replies

7. Shell Programming and Scripting

Need script to make big directory structure

Hi, I'm a novice and I'd like to make a directory structure with a hundred or so folders. I've tried mkdir /foo/foo1/etc... mkdir /foo/foo2/etc mkdir /foo/foo3/etc mkdir /foo/foo4/etc ...but it appends '@' to each folder name and then fails on the subdirectories. Is it better to use a... (2 Replies)
Discussion started by: kamur
2 Replies

8. UNIX for Dummies Questions & Answers

mkdir unix command

hi.. i want to know how mkdir command make directory in linux....?? (2 Replies)
Discussion started by: rinkugarg
2 Replies

9. Programming

how to simulate "mkdir -p /home/blah1/blah2/blah3" in "c" where only /home exist

I'm trying to make use of mkdir(char *pathname, S_IRWXU) to create the directories. but it only creates one directory at a time. so I have to separate the tokens for "/home/blah1/blah2/blah3" as "home blah1 blah2 blah3" using delimiter "/", but it is again hectic to create such directory... (8 Replies)
Discussion started by: platinumedge
8 Replies

10. UNIX for Dummies Questions & Answers

FTP: Error -140: remote mkdir failed

I've just installed vsftpd on Ubuntu 9.04 server. I can access using my ftp client, however I cannot use mkdir either upload files. I get the following errors: `Error -140: remote mkdir failed` My configuration file has: write_enable = YES Is there some other parameter I should... (2 Replies)
Discussion started by: aneuryzma
2 Replies

11. UNIX for Dummies Questions & Answers

Pb commande externe \r

J'ai un soucis avec une commande externe... la voici : #!/bin/bash/ mkdir lol mkdir not sleep 2 mkdir glop Mon bash l'éxécute (déjà ça :rolleyes:) à sa façon..... Je me retrouve avec non pas 3 dossiers lol, not et glop. Mais les dossiers : lol?, not? et glop (oui ! un de bon !!!!!). Et, une... (9 Replies)
Discussion started by: sluvah
9 Replies

12. Red Hat

Can't run mkdir even as root please help

I cannot mkdir as root please see below # mkdir /home/vm1/Desktop/nfs mkdir: cannot create directory `/home/vm1/Desktop/nfs': Permission deniedso i checked the selinux context below and got # ls -Z /home/vm1 drwxrwxrwx. root root system_u:object_r:autofs_t:s0 Desktop drwxr-xr-x. vm1 ... (10 Replies)
Discussion started by: nokia3310
10 Replies

13. Shell Programming and Scripting

Make directories containing subdirs using mkdir

Hello everybody, I wonder if there's a way to make a directory that contains multiple subdirectories. For example, if I want to make /home/student under the current working directory, how do I do it? Can I do it using a single mkdir command or do I have make home first, cd into it and then make... (1 Reply)
Discussion started by: Yongfeng
1 Replies