¸®´ª½º °ü·Ã °­Á¶õ

HomePage Backward Forward Post Reply List
Delete Modify
  Á¦¸ñ   µð·ºÅ丮 ¸í·É¾î (mkdir, rmdir) 1998/05/08 (10:02)
À̸§ ±èÈ¿¿ø
¹øÈ£ 17
Á¶È¸ 426
º»¹® 3.11 mkdir

ÀÏ´Ü ±âº»ÀûÀÎ ÆÄÀÏ¿¡ ´ëÇÑ ÀÛ¾÷¿¡ ´ëÇØ ¾Ë¾Æ º¸¾ÒÀ¸´Ï À̹ø¿¡´Â µð·ºÅä
¸®¿¡ ´ëÇØ ¾Ë¾Æ º¾½Ã´Ù. ¸ÕÀú µð·ºÅ丮¸¦ »ý¼ºÇÏ´Â ¹æ¹ý¿¡ ´ëÇØ ¾Ë¾Æ º¾
½Ã´Ù. µð·ºÅ丮¸¦ »ý¼ºÇÒ¶§¿¡´Â "mkdir"À̶ó´Â ¸í·É¾î¸¦ »ç¿ëÇÏ¸é µË´Ï
´Ù. ³Ê¹« ±âº»ÀûÀΰÅÁÒ? ¹¹ Ưº°ÇÑ ¿É¼ÇÀº ¾ø½À´Ï´Ù.

# ls -p [Enter]
Mail/       Xdefaults   Xrootenv.0  nsmail/
# mkdir test [Enter]
# ls -p [Enter]
Mail/       Xdefaults   Xrootenv.0  nsmail/     test/
#

¿ì¸®°¡ ¾Õ¿¡¼­ ¹è¿î°Íó·³ µð·ºÅ丮 À̸§À» ¿©·¯ ¾Æ±Ô¸ÕÆ®·Î ÁöÁ¤Çؼ­ ÇÑ
²¨¹ø¿¡ µð·ºÅ丮¸¦ ¸¸µé¼öµµ ÀÖ½À´Ï´Ù.

# ls -p [Enter]
Mail/       Xdefaults   Xrootenv.0  nsmail/
# mkdir test test1 test2 [Enter]
# ls -p [Enter]
Mail/       Xrootenv.0  test/       test2/
Xdefaults   nsmail/     test1/
#

<Âü°í ½ÃÀÛ>

# ls -p [Enter]
Mail/       Xdefaults   Xrootenv.0  nsmail/
# mkdir test/test1 [Enter]
mkdir: cannot make directory `test/test1': No such file or directory
#

À§¿¡¼­ º¸¿©ÁÖ°í ÀÖ´Â °ÍÀÌ ¾î¶² ÀǹÌÀÎÁö ¾Ë°Ú½À´Ï±î? ±Ã±¹ÀûÀ¸·Î ¸¸µé
°íÀÚ ÇÏ´Â µð·ºÅ丮´Â testµð·ºÅ丮¹ØÀÇ test1À̶ó´Â µð·ºÅ丮Àε¥ test
¶ó´Â µð·ºÅ丮°¡ Á¸ÀçÇÏÁö ¾Ê±â ¶§¹®¿¡ ¿¡·¯°¡ ¹ß»ýÇÑ °ÍÀÔ´Ï´Ù. ¿©·¯ºÐ
µéÀº ÀÌ¹Ì ´Ù ¾Ë°í ÀÖ´Â ³»¿ëÀÌ°ÚÁö¸¸ °¡²û Àؾî¹ö¸®´Â °æ¿ì°¡ Àֱ⠶§
¹®¿¡ ¾ð±ÞÇØ º¸¾Ò½À´Ï´Ù.

<Âü°í ³¡>

3.12 rmdir

»ý¼ºµÇ¾î ÀÖ´Â µð·ºÅ丮¸¦ »èÁ¦ÇÏ°íÀÚ ÇÒ ¶§¿¡´Â "rmdir"À̶ó´Â ¸í·É¾î
¸¦ »ç¿ëÇÏ¸é µË´Ï´Ù.

# ls -p [Enter]
Mail/       Xdefaults   Xrootenv.0  nsmail/     test/
# rmdir test [Enter]
# ls -p [Enter]
Mail/       Xdefaults   Xrootenv.0  nsmail/
#

¸¶Âù°¡Áö·Î ÇѲ¨¹ø¿¡ ¿©·¯ µð·ºÅ丮¸¦ ¾ø¾Ù¼öµµ ÀÖ½À´Ï´Ù.

# ls -p [Enter]
Mail/       Xrootenv.0  test/       test2/
Xdefaults   nsmail/     test1/
# rmdir test test1 test2 [Enter]
# ls -p [Enter]
Mail/       Xdefaults   Xrootenv.0  nsmail/
#

<Âü°í ½ÃÀÛ>

# ls -p [Enter]
Mail/       Xdefaults   Xrootenv.0  nsmail/     test/
# rmdir test [Enter]
rmdir: test: Directory not empty
#

Áö¿ì·Á´Â µð·ºÅ丮¾È¿¡ ÆÄÀÏÀ̳ª ¼­ºê µð·ºÅ丮°¡ Á¸ÀçÇÏ¸é µð·ºÅ丮
¸¦ Áö¿ï¼ö ¾ø½À´Ï´Ù. ÀÌ·²¶§¿¡´Â µð·ºÅ丮¾ÈÀ¸·Î À̵¿Çؼ­ ¾È¿¡ ¼ÓÇØÀÖ
´Â ¼­ºê µð·ºÅ丮¿Í ÆÄÀÏÀ» Áö¿îÈÄ¿¡ ÃÖÁ¾ÀûÀ¸·Î µð·ºÅ丮¸¦ Áö¿öÁà¾ß
ÇÕ´Ï´Ù. ¸¸¾à¿¡ ÀÌ °úÁ¤ÀÌ ¹ø°Å·¯¿ì¸é ¿ì¸®°¡ ¾Õ¿¡¼­ ¹è¿î "rm"À̶ó´Â
¸í·É¾î·Î °£´ÜÇÏ°Ô Áö¿ì¸é µË´Ï´Ù.

# ls -p [Enter]
Mail/       Xdefaults   Xrootenv.0  nsmail/     test/
# rm -rf test [Enter]
# ls -p [Enter]
Mail/       Xdefaults   Xrootenv.0  nsmail/
#

<Âü°í ³¡>

HomePage Backward Forward Post Reply List
1998 by swindler