Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(2)

rmdir(2)

stat(2)

umask(2)



MKDIR(2)                COMMAND REFERENCE                MKDIR(2)



NAME
     mkdir - make a directory file

SYNOPSIS
     mkdir(path, mode)
     char *path;
     int mode;

DESCRIPTION
     Mkdir creates a new directory file with name path.  The mode
     of the new file is initialized from mode.  (The protection
     part of the mode is modified by the process's mode mask; see
     umask(2)).

     The directory's owner ID is set to the process's effective
     user ID.  The directory's group ID is set to that of the
     parent directory in which it is created.

     The low-order 9 bits of mode are modified by the process's
     file mode creation mask: all bits set in the process's file
     mode creation mask are cleared.  See umask(2).

DIAGNOSTICS
     Mkdir will fail and no directory will be created if:

     [ENOASCII]     The path argument contains a byte with the
                    high-order bit set.

     [ENAMETOOLONG] The argument path is too long.

     [ENOTDIR]      A component of the path prefix is not a
                    directory.

     [ENOENT]       A component of the path prefix does not
                    exist.

     [EACCES]       You do not have write permission in the
                    directory in which you want to create the new
                    directory, or you do not have search
                    permission in one of the components of the
                    path prefix.

     [EROFS]        The named file resides on a read-only file
                    system.

     [EEXIST]       The named directory path already exists.

     [EFAULT]       Path points outside the process's allocated
                    address space.

     [ELOOP]        Too many symbolic links were encountered in
                    translating the pathname.



Printed 4/6/89                                                  1





MKDIR(2)                COMMAND REFERENCE                MKDIR(2)



     [EIO]          An I/O error occurred while writing to the
                    file system.

     [ENOSPC]       The file system is out of inodes.

     [ENOSPC]       The directory in which the entry for the new
                    file is being placed cannot be extended
                    because there is no space left on the file
                    system containing the directory.

     [ENOSPC]       The new directory cannot be created because
                    there is no space left on the file system
                    which will contain the directory.

     [ENFILE]       The system inode table is full.

RETURN VALUE
     Upon successful completion, a value of 0 is returned.
     Otherwise, a value of -1 is returned and errno is set to
     indicate the error.

SEE ALSO
     chmod(2), rmdir(2), stat(2), and umask(2).
































Printed 4/6/89                                                  2



%%index%%
na:264,81;
sy:345,485;
de:830,788;
di:1618,1243;3197,628;
rv:3825,280;
se:4105,202;
%%index%%000000000117

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026