Scroll to navigation

MKDIR(2) Linux Programmeurs Handleiding MKDIR(2)

NAAM

mkdir, mkdirat - maak een map

SAMENVATTING

#include <sys/stat.h>
#include <sys/types.h>
int mkdir(const char *padnaam, mode_t toestand);
#include <fcntl.h>           /* Definitie van AT_* constanten */
#include <sys/stat.h>
int mkdirat(int map_bi, const char *padnaam, mode_t toestand);


Test Macro´s in glibc (zie feature_test_macros(7)):

mkdirat():

Sinds glibc 2.10:
_POSIX_C_SOURCE >= 200809L
Vóór glibc 2.10:
_ATFILE_SOURCE

BESCHRIJVING

mkdir() probeert een map te maken met de naam padnaam.

The argument mode specifies the mode for the new directory (see inode(7)). It is modified by the process's umask in the usual way: in the absence of a default ACL, the mode of the created directory is (mode & ~umask & 0777). Whether other mode bits are honored for the created directory depends on the operating system. For Linux, see NOTES below.

The newly created directory will be owned by the effective user ID of the process. If the directory containing the file has the set-group-ID bit set, or if the filesystem is mounted with BSD group semantics (mount -o bsdgroups or, synonymously mount -o grpid), the new directory will inherit the group ownership from its parent; otherwise it will be owned by the effective group ID of the process.

Al de ouder-map het zet-groep-id bit gezet heeft, dan zal dat ook gezet worden voor de nieuw gemaakte map.

mkdirat()

The mkdirat() system call operates in exactly the same way as mkdir(), except for the differences described here.

If the pathname given in pathname is relative, then it is interpreted relative to the directory referred to by the file descriptor dirfd (rather than relative to the current working directory of the calling process, as is done by mkdir() for a relative pathname).

If pathname is relative and dirfd is the special value AT_FDCWD, then pathname is interpreted relative to the current working directory of the calling process (like mkdir()).

Als padnaam absoluut is, dan wordt mapbi genegeerd.

See openat(2) for an explanation of the need for mkdirat().

EIND WAARDE

mkdir() en mkdirat() geven nul terug bij slagen, of -1 als een fout optrad (in welk geval errno naar behoren wordt gezet).

FOUTEN

EACCES
De ouder map status schrijf toestemming niet toe voor het proces, of een van de mappen in padnaam stond zoek (uitvoer) toestemming niet toe.
EDQUOT
The user's quota of disk blocks or inodes on the filesystem has been exhausted.
EEXIST
pathname already exists (not necessarily as a directory). This includes the case where pathname is a symbolic link, dangling or not.
EFAULT
padnaam wijst buiten de voor u toegankelijke adresruimte.
EINVAL
The final component ("basename") of the new directory's pathname is invalid (e.g., it contains characters not permitted by the underlying filesystem).
ELOOP
Teveel symbolische koppelingen werden tegengekomen bij het vaststellen van padnaam.
EMLINK
The number of links to the parent directory would exceed LINK_MAX.
ENAMETOOLONG
padnaam was te lang.
ENOENT
Een map deel van padnaam bestaat niet of is een loshangende symbolische koppeling.
ENOMEM
Onvoldoende kernelgeheugen voorhanden.
ENOSPC
Het apparaat dat padnaam bevat heeft geen ruimte voor een nieuwe map.
ENOSPC
De nieuwe dir kan niet gemaakt worden omdat het schijf quota van de gebruiker uitgeput is.
ENOTDIR
Een deel gebruikt als map in padnaam is in feite geen map.
EPERM
The filesystem containing pathname does not support the creation of directories.
EROFS
padnaam verwijst naar een bestand op een alleen-lezen bestandsysteem.

The following additional errors can occur for mkdirat():

EBADF
mapbi is geen geldige bestandindicator.
ENOTDIR
padnaam is relatief en mapbi is een bestandsindicatoor die naar een bestand wijst die geen map is.

VERSIES

mkdirat() was added to Linux in kernel 2.6.16; library support was added to glibc in version 2.4.

VOLDOET AAN

mkdir(): SVr4, BSD, POSIX.1-2001, POSIX.1-2008.

mkdirat(): POSIX.1-2008.

OPMERKINGEN

Under Linux, apart from the permission bits, the S_ISVTX mode bit is also honored.

There are many infelicities in the protocol underlying NFS. Some of these affect mkdir().

Glibc-opmerkingen

On older kernels where mkdirat() is unavailable, the glibc wrapper function falls back to the use of mkdir(). When pathname is a relative pathname, glibc constructs a pathname based on the symbolic link in /proc/self/fd that corresponds to the dirfd argument.

ZIE OOK

mkdir(1), chmod(2), chown(2), mknod(2), mount(2), rmdir(2), stat(2), umask(2), unlink(2), acl(5) path_resolution(7)

COLOFON

Deze pagina is onderdeel van release 5.04 van het Linux man-pages-project. Een beschrijving van het project, informatie over het melden van bugs en de nieuwste versie van deze pagina zijn op https://www.kernel.org/doc/man-pages/ te vinden.

VERTALING

De Nederlandse vertaling van deze handleiding is geschreven door Jos Boersema <joshb@xs4all.nl> en Mario Blättermann <mario.blaettermann@gmail.com>

Deze vertaling is vrije documentatie; lees de GNU General Public License Version 3 of later over de Copyright-voorwaarden. Er is geen AANSPRAKELIJKHEID.

Indien U fouten in de vertaling van deze handleiding zou vinden, stuur een e-mail naar debian-l10n-dutch@lists.debian.org.

15 september 2017 Linux