.\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#) mkdir. 2 8.2 (Berkeley) 12/11/93 .\" %FreeBSD: src/lib/libc/sys/mkdir. 2, v 1.9. 2.6 2001/12/14 18:34:01 ru Exp % .\" .\" $FreeBSD: doc/ja_JP.eucJP/man/man2/mkdir. 2, v 1.9 2002/01/19 04:13:35 horikawa Exp $ .Dd December 11, 1993 .Dt MKDIR 2 .Os .Sh ¸íĪ .Nm mkdir .Nd µð·ºÅ丮 ÆÄÀÏÀ» ÀÛ¼ºÇÑ´Ù .Sh ÇÁ·Î±×·¥ ¶óÀ̺귯¸® .Lb libc .Sh ¼­½Ä .In sys/types.h .In sys/stat.h .Ft int .Fn mkdir "const char *path" "mode_t mode" .Sh ÇØ¼³ µð·ºÅ丮 .Fa path ÇÏÁö¸¸, .Fa mode ¿¡ ÀÇÇÑ ÁöÁ¤¿¡ È£ÃâÇØ ÇÁ·Î¼¼½ºÀÇ .Xr umask 2 ±×¸®°í Á¦¾àÀ» ´õÇÑ ¾×¼¼½º Çã°¡·Î ÀÛ¼ºµË´Ï´Ù. .Pp µð·ºÅ丮ÀÇ ¼ÒÀ¯ÀÚ ID ´Â, ÇÁ·Î¼¼½ºÀÇ ½ÇÈ¿ À¯Àú ID ·Î ¼³Á¤µË´Ï´Ù. µð·ºÅ丮ÀÇ ±×·ì ID ´Â, ±× µð·ºÅ丮°¡ ÀÛ¼ºµÈ Ä£µð·ºÅ丮ÀÇ ±×·ì ID ·Î ¼³Á¤µË´Ï´Ù. .Sh ¹Ýȯ°ª .Rv -std mkdir .Sh ¿¡·¯ .Fn mkdir (Àº)´Â ´ÙÀ½ÀÇ °æ¿ì, 󸮿¡ ½ÇÆÐÇØ µð·ºÅ丮´Â ÀÛ¼ºµÇÁö ¾Ê½À´Ï´Ù. .Bl -tag -width Er .It Bq Er ENOTDIR ÆÐ½ºÀÇ ¿ø°¡¿ä¼ÒÁß¿¡ µð·ºÅ丮 ÀÌ¿ÜÀÇ °ÍÀÌ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù. .It Bq Er ENAMETOOLONG ÆÐ½º¸íÀÇ ¿ø°¡¿ä¼Ò°¡ 255 ij¸¯Å͸¦ ³Ñ°í ÀÖ´ÂÁö, ¶Ç´Â ÆÐ½º¸í Àüü°¡ 1023 ij¸¯Å͸¦ ³Ñ°í ÀÖ½À´Ï´Ù. .It Bq Er ENOENT ÆÐ½ºÀÇ ¿ø°¡¿ä¼Ò°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù. .It Bq Er EACCES ÁöÁ¤µÈ ÆÐ½º¿¡´Â, °Ë»öÀÌ Çã°¡µÇ¾î ÀÖÁö ¾ÊÀº µð·ºÅ丮°¡ Æ÷ÇԵǾî ÀÖ½À´Ï´Ù. ¶Ç´Â, ÀÛ¼ºÇÏ´Â µð·ºÅ丮ÀÇ Ä£µð·ºÅ丮¿¡ ´ëÇÑ ±âÀÔ ±ÇÇÑÀÌ °ÅºÎµÇ¾ú½À´Ï´Ù. .It Bq Er ELOOP ÆÐ½º¸íÀ» º¯È¯ÇÒ °æ¿ì¿¡ °ËÃâµÈ ±âÈ£ ¿¬°áÀÌ ³Ê¹« ¸¹½À´Ï´Ù. .It Bq Er EROFS ÁöÁ¤µÈ ÆÄÀÏÀº Àбâ Àü¿ë ÆÄÀÏ ½Ã½ºÅÛ»ó¿¡ ÀÖ½À´Ï´Ù. .It Bq Er EEXIST ÁöÁ¤ÀÇ ÆÄÀÏÀÌ ¹ú½á Á¸ÀçÇÕ´Ï´Ù. .It Bq Er ENOSPC »õ·Î¿î µð·ºÅ丮¸¦ ÀÛ¼ºÇÒ ¼ö ¾ø½À´Ï´Ù. ±× µð·ºÅ丮¸¦ ¸¸µå´Â ¿ë·®ÀÌ ÆÄÀÏ ½Ã½ºÅÛ¿¡ ³²¾Æ ÀÖÁö ¾Ê½À´Ï´Ù. .It Bq Er ENOSPC µð·ºÅ丮¸¦ ÀÛ¼ºÇÏ´Â ÆÄÀÏ ½Ã½ºÅÛ»ó¿¡ ¹Ì»ç¿ëÀÇ inode °¡ ¾ø½À´Ï´Ù. .It Bq Er EDQUOT »õ·Î¿î µð·ºÅ丮¸¦ ÀÛ¼ºÇÒ ¼ö ¾ø½À´Ï´Ù. µð·ºÅ丮¸¦ ¸¸µå´Â ÆÄÀÏ ½Ã½ºÅÛ»óÀÇ µð½ºÅ© ºí·ÏÀÇ À¯ÀúÀÇ ÄõÅͰ¡ °í°¥Çß½À´Ï´Ù. .It Bq Er EDQUOT µð·ºÅ丮¸¦ ÀÛ¼ºÁßÀÇ ÆÄÀÏ ½Ã½ºÅÛ»óÀÇ À¯ÀúÀÇ inode ÀÇ ÄõÅͰ¡ °í°¥Çß½À´Ï´Ù. .It Bq Er EIO µð·ºÅ丮 ¿£Æ®¸®ÀÇ ÀÛ¼ºÁß, ȤÀº inode ¸¦ ÇÒ´çÁß¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇß½À´Ï´Ù. .It Bq Er EIO ÆÄÀÏ ½Ã½ºÅÛ¿¡ ÀÐ°í ¾²±âÇϰí ÀÖ´Â µ¿¾È¿¡ ÀÔÃâ·Â ¿¡·¯°¡ ¹ß»ýÇß½À´Ï´Ù. .It Bq Er EFAULT .Fa path (Àº)´Â, ÇÁ·Î¼¼½º¿¡ ÇÒ´çÇÒ ¼ö ÀÖ¾ú´ø address °ø°£ÀÇ ¹üÀ§¿Ü¸¦ °¡¸®Å°°í ÀÖ½À´Ï´Ù. .El .Sh °ü·Ã Ç׸ñ .Xr chmod 2 , .Xr stat 2 , .Xr umask 2 .Sh Ç¥ÁØ .Fn mkdir ÇÔ¼ö´Â .St -p1003.1-90 ¿¡ ÁذÅÇϰí ÀÖ½À´Ï´Ù.