mkdir(1) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

mkdir(1)

mkdir(1)                         User Commands                        mkdir(1)



NAME
       mkdir - make directories

SYNOPSIS
       /usr/bin/mkdir [-m mode | --mode=mode] [-p | --parents]
            [-v | --verbose] [--help] dir...

DESCRIPTION
       The  mkdir  command creates the named directories in mode 777 (possibly
       altered by the file mode creation mask umask(1)).


       Standard entries in a directory (for instance, the files ".",  for  the
       directory  itself,  and  "..",  for its parent) are made automatically.
       mkdir cannot create these entries by  name.  Creation  of  a  directory
       requires write permission in the parent directory.


       The  owner-ID  and  group-ID  of  the  new  directories  are set to the
       process's effective user-ID and group-ID, respectively. mkdir calls the
       mkdir(2) system call.

   setgid and mkdir
       To  change  the  setgid  bit on a newly created directory, you must use
       chmod  g+s or chmod  g-s after executing mkdir.


       The setgid bit setting is inherited from the parent directory.

OPTIONS
       The following options are supported:

       --help                  Display usage message and exit.


       -m mode, --mode=mode    This option allows users to specify the mode to
                               be  used for new directories. Choices for modes
                               can be found in chmod(1).


       -p, --parents           With this option, mkdir creates dir by creating
                               all  the non-existing parent directories first.
                               The mode given to intermediate  directories  is
                               the  difference between 777 and the bits set in
                               the file mode creation  mask.  The  difference,
                               however,  must  be at least 300 (write and exe‐
                               cute permission for the user).


       -v, --verbose           Display  a  summary  message  for  the  created
                               directory or directories.


OPERANDS
       The following operand is supported:

       dir    A path name of a directory to be created.


EXAMPLES
       Example 1 Using mkdir



       The following example:


         example% mkdir -p ltr/jd/jan




       creates the subdirectory structure ltr/jd/jan.

ENVIRONMENT VARIABLES
       See  environ(7) for descriptions of the following environment variables
       that affect the execution of mkdir:  LANG,  LC_ALL,  LC_CTYPE,  LC_MES‐
       SAGES, and NLSPATH.

EXIT STATUS
       The following exit values are returned:

       0     All the specified directories were created successfully or the -p
             option was specified and all the specified directories now exist.


       >0    An error occurred.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE  VALUE  _  Availabilitysystem/core-os  _ CSIEnabled _ Interface
       StabilityCommitted _ StandardSee standards(7).


SEE ALSO
       chmod(1), rm(1), sh(1), umask(1), Intro(2), mkdir(2),  getopt_long(3C),
       mkdirp(3GEN), attributes(7), environ(7), standards(7)



Oracle Solaris 11.4               4 Feb 2015                          mkdir(1)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3