ºìÁªLinuxÃÅ»§
Linux°ïÖú

´´½¨ºÍɾ³ýĿ¼µÄÃüÁî

·¢²¼Ê±¼ä:2012-04-20 15:57:51À´Ô´:ºìÁª×÷Õß:empast
1.mkdirÃüÁî
mkdirÃüÁîÓÃÀ´´´½¨Ä¿Â¼¡£
Ò»°ã¸ñʽ£ºmkdir[Ñ¡Ïî] dirname¡­
ÔÚ´´½¨Îļþʱ£¬²»Òª°ÑËùÓеÄÎļþ¶¼´æ·ÅÔÚÖ÷Ŀ¼ÖУ¬¿ÉÒÔ´´½¨×ÓĿ¼£¬Í¨¹ýËüÃÇÀ´¸üÓÐЧµØ×éÖ¯Îļþ¡£
ʾÀý£º
$ mkdir--mode=700 /home/mengqc/test
ÔÚĿ¼/home/mengqcϽ¨Á¢×ÓĿ¼test£¬²¢ÇÒÖ»ÓÐÎļþÖ÷ÓжÁ¡¢Ð´ºÍÖ´ÐÐȨÏÞ£¬ÆäËûÈËÎÞȨ·ÃÎÊ¡£
$ mkdir-p -m 750 bin/os_1
ͬʱ½¨Á¢Á½¸öĿ¼£ºbinºÍËüµÄ×ÓĿ¼os_1£¬È¨ÏÞÉèÖÃΪÎļþÖ÷¿É¶Á¡¢Ð´¡¢Ö´ÐУ¬Í¬×éÓû§¿É¶ÁºÍÖ´ÐУ¬ÆäËûÓû§ÎÞȨ·ÃÎÊ¡£

2.ɾ³ýĿ¼
rmdirÃüÁî¿ÉÒÔ´ÓÒ»¸öĿ¼ÖÐɾ³ýÒ»¸ö»ò¶à¸ö¿ÕµÄ×ÓĿ¼¡£
Ò»°ã¸ñʽ£ºrmdir [Ñ¡Ïî] ¡­dirname¡­
ɾ³ý×ÓĿ¼os_1ºÍÆ丸Ŀ¼bin£º
$ cd /home/mengqc/test
$ rmdir -p bin/os_1
×ÓĿ¼±»É¾³ý֮ǰӦ¸ÃÊÇ¿ÕĿ¼¡£
µ±Ç°¹¤×÷Ŀ¼±ØÐëÔÚ±»É¾³ýĿ¼֮ÉÏ£¬²»ÄÜÊDZ»É¾³ýĿ¼±¾Éí£¬Ò²²»ÄÜÊDZ»É¾³ýĿ¼µÄ×ÓĿ¼¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 1 ÌõÆÀÂÛ

  1. nmxylf01344 ÓÚ 2012-04-21 02:57:53·¢±í:

    Ë­ÓÐÕ⹦·òÈÃÈ˲ÂÀ´²ÂÈ¥ÄØÕæÊÇ·³¸ö͸¶¥µÄƨÊÂÇé°¡