ÇáËÉÕÆÎÕLinuxÖÐÉó²é×ÓĿ¼µÄ¼¼ÇÉ
ÔÚLinuxϵͳÖУ¬Éó²é×ÓĿ¼ÊÇÎÒÃÇÔÚÒ»Ñùƽ³£ÊÂÇéÖо³£Óöµ½µÄÐèÇó¡£ÕÆÎÕ׼ȷµÄ¼¼ÇÉÄܹ»ÈÃÎÒÃǸü¸ßЧµØÖÎÀíºÍä¯ÀÀÎļþϵͳÖеÄĿ¼½á¹¹¡£±¾ÎĽ«ÏÈÈݼ¸ÖÖÇáËÉÉó²é×ÓĿ¼µÄÒªÁ죬°üÀ¨lsÏÂÁî¡¢findÏÂÁîºÍtreeÏÂÁÒÔ¼°ÏìÓ¦µÄ´úÂëʾÀý¡£
ʹÓÃlsÏÂÁîÉó²é×ÓĿ¼
lsÏÂÁîÊÇLinuxϵͳÖÐ×î³£ÓõÄÉó²éÎļþºÍĿ¼µÄÏÂÁîÖ®Ò»¡£ÒªÉó²éÒ»¸öĿ¼ÏµÄËùÓÐ×ÓĿ¼£¬Ö»ÐèÔÚlsÏÂÁîºó¼ÓÉÏĿ¼·¾¶¼´¿É¡£ÀýÈ磬ҪÉó²éÄ¿½ñĿ¼ÏµÄ×ÓĿ¼£¬¿ÉÒÔʹÓÃÈçÏÂÏÂÁ
ls -l
µÇ¼ºó¸´ÖÆ
ÈôÊÇÐèÒªÉó²éÖ¸¶¨Ä¿Â¼µÄ×ÓĿ¼£¬¿ÉÒÔʹÓÃÈçÏÂÏÂÁ
ls -l /path/to/directory
µÇ¼ºó¸´ÖÆ
ʹÓÃfindÏÂÁîÉó²é×ÓĿ¼
findÏÂÁî¿ÉÒÔÔÚÖ¸¶¨Ä¿Â¼Ï²éÕÒÎļþºÍĿ¼¡£ÒªÉó²éÒ»¸öĿ¼ÏµÄËùÓÐ×ÓĿ¼£¬¿ÉÒÔʹÓÃÈçÏÂÏÂÁ
find /path/to/directory -type d
µÇ¼ºó¸´ÖÆ
ÕâÀïµÄ”-type d”ÌåÏÖfindÏÂÁîÖ»»áÏÔʾĿ¼¡£ÈôÊÇÐèÒªÏÔʾ×ÓĿ¼µÄÏêϸÐÅÏ¢£¬¿ÉÒÔʹÓÃÈçÏÂÏÂÁ
find /path/to/directory -type d -ls
µÇ¼ºó¸´ÖÆ
ʹÓÃtreeÏÂÁîÉó²é×ÓĿ¼
treeÏÂÁî»áÒÔÊ÷×´½á¹¹ÏÔʾָ¶¨Ä¿Â¼ÏµÄÎļþºÍ×ÓĿ¼¡£Òª×°ÖÃtreeÏÂÁ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ
sudo apt-get install tree
µÇ¼ºó¸´ÖÆ
×°ÖÃÍê³Éºó£¬¿ÉÒÔʹÓÃÈçÏÂÏÂÁîÉó²éÖ¸¶¨Ä¿Â¼µÄ×ÓĿ¼£º
tree /path/to/directory
µÇ¼ºó¸´ÖÆ
treeÏÂÁî»áÒÔÌõÀí½á¹¹Õ¹Ê¾Ä¿Â¼ºÍ×ÓĿ¼֮¼äµÄ¹Øϵ£¬ºÜÊÇÖ±¹ÛºÍÒ×ÓÚÃ÷È·¡£
ͨ¹ýÒÔÉÏÏÈÈÝ£¬ÎÒÃÇÏàʶÁËÔÚLinuxϵͳÖÐÔõÑùÇáËÉÉó²é×ÓĿ¼µÄÒªÁ죬°üÀ¨lsÏÂÁî¡¢findÏÂÁîºÍtreeÏÂÁî¡£ÕâЩ¼¼ÇÉ¿ÉÒÔ×ÊÖúÎÒÃǸüºÃµØÖÎÀíºÍä¯ÀÀĿ¼½á¹¹£¬Ìá¸ßÊÂÇéЧÂÊ¡£Ï£Íû±¾ÎĵÄÄÚÈݶÔÄúÓÐËù×ÊÖú¡£
ÒÔÉϾÍÊÇÇáËÉÕÆÎÕLinuxÖÐÉó²é×ÓĿ¼µÄ¼¼ÇɵÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡