www.delorie.com/gnu/docs/textutils/coreutils_73.html   search  
Buy GNU books!

GNU Core-utils

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.3 mkdir: Make directories

mkdir creates directories with the specified names. Synopsis:

mkdir [option]... name...

If a name is an existing file but not a directory, mkdir prints a warning message on stderr and will exit with a status of 1 after processing any remaining names. The same is done when a name is an existing directory and the -p option is not given. If a name is an existing directory and the -p option is given, mkdir will ignore it. That is, mkdir will not print a warning, raise an error, or change the mode of the directory (even if the -m option is given), and will move on to processing any remaining names.

The program accepts the following options. Also see 2. Common options.

`-m mode'
Set the mode of created directories to mode, which is symbolic as in chmod and uses `a=rwx' (read, write and execute allowed for everyone) minus the bits set in the umask for the point of the departure. See section 26. File permissions.

Make any missing parent directories for each argument. The mode for parent directories is set to the umask modified by `u+wx'. Ignore arguments corresponding to existing directories.

Print a message for each created directory. This is most useful with `--parents'.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003