Mkdir function-linux

Source: Internet
Author: User

Mkdir function-linux mkdir function header file library: # include <sys/stat. h> # include <sys/types. h> function prototype: int mkdir (const char * pathname, mode_t mode); Function Description: The mkdir () function creates a directory named after the pathname parameter in mode, mode defines the permissions for creating a directory. Returned value: If the directory is successfully created, 0 is returned; otherwise,-1 is returned and the error is recorded in the global variable errno.
Mode: S_IRWXU 00700 indicates that the object owner has the read, write, and execute permissions S_IRUSR (S_IREAD) 00400, and S_IWUSR (S_IWRITE) indicates that the object owner has the read permission S_IWUSR (S_IWRITE) 00200 permission indicates that the file owner has the write permission S_IXUSR (S_IEXEC) 00100 permission, indicating that the file owner has the execution permission S_IRWXG 00070, indicating that the file user group has the read permission, the write and execute permissions S_IRGRP 00040 indicate that the file user group has the read permission S_IWGRP 00020, indicating that the file user group has the write permission S_IXGRP 00010, this indicates that the file user group has the permission to execute S_IRWXO 00007, that is, other users have the permission to read, write, and execute operations S_IROTH 00004, and that other users have the read permission S_IWOTH 00002, indicates that other users have the write permission S_IXOTH 00001, and other users have the execution permission.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.