×ðÁú¿­Ê±

ÔÚLinuxÖÐÔõÑùÉó²éÎļþµÄ¾ø¶Ô·¾¶

ÔÚLinuxÖÐÏÔʾÎļþµÄÍêÕû·¾¶ÊÇÒ»Ïî·Ç¾­³£¼ûÇÒÓÐÓõIJÙ×÷¡£Í¨¹ýÏÔʾÎļþµÄÍêÕû·¾¶ £¬ÎÒÃÇ¿ÉÒÔ¸üÀû±ãµØ¶¨Î»ÎļþÔÚϵͳÖеÄλÖà £¬¾ÙÐÐÎļþÖÎÀíºÍ²Ù×÷¡£ÔÚLinuxϵͳÖÐ £¬¿ÉÒÔͨ¹ýʹÓÔpwd”ÏÂÁîÀ´ÏÔʾĿ½ñÊÂÇéĿ¼µÄÍêÕû·¾¶ £¬ÒÔ¼°Í¨¹ýʹÓÔrealpath”»ò”readlink”ÏÂÁîÀ´ÏÔʾָ¶¨ÎļþµÄÍêÕû·¾¶¡£½ÓÏÂÀ´½«ÏêϸÏÈÈÝÔõÑùÔÚLinuxÖÐÏÔʾÎļþµÄÍêÕû·¾¶ £¬²¢¸½ÉÏÏêϸµÄ´úÂëʾÀý¡£

ʹÓÃpwdÏÂÁîÏÔʾĿ½ñÊÂÇéĿ¼µÄÍêÕû·¾¶

ÔÚLinuxϵͳÖÐ £¬¿ÉÒÔʹÓÔpwd”ÏÂÁîÀ´ÏÔʾĿ½ñÊÂÇéĿ¼µÄÍêÕû·¾¶¡£”pwd”ÏÂÁî»áÊä³öÄ¿½ñËùÔÚĿ¼µÄÍêÕû·¾¶ £¬ÈÃÓû§ÇåÎúµØÖªµÀÄ¿½ñËùÔÚλÖá£ÒÔÏÂÊÇÒ»¸ö¼òÆÓµÄʾÀý£º

pwd

µÇ¼ºó¸´ÖÆ

ÔËÐÐÒÔÉÏÏÂÁî £¬ÏµÍ³½«Êä³öÄ¿½ñÊÂÇéĿ¼µÄÍêÕû·¾¶ £¬ÀýÈ磺

/home/user/Documents

µÇ¼ºó¸´ÖÆ

ʹÓÃrealpathÏÂÁîÏÔʾָ¶¨ÎļþµÄÍêÕû·¾¶

ÈôÊÇÐèÒªÏÔʾָ¶¨ÎļþµÄÍêÕû·¾¶ £¬¿ÉÒÔʹÓÔrealpath”ÏÂÁî¡£”realpath”ÏÂÁî¿ÉÒÔ½«Ïà¶Ô·¾¶×ª»»Îª¾ø¶Ô·¾¶ £¬²¢Êä³öÎļþµÄÍêÕû·¾¶¡£ÒÔÏÂÊÇÒ»¸öʾÀý´úÂ룺

realpath filename

µÇ¼ºó¸´ÖÆ

ÆäÖÐ £¬”filename”ΪÐèÒªÏÔʾÍêÕû·¾¶µÄÎļþÃû¡£ÔËÐÐÒÔÉÏÏÂÁî £¬ÏµÍ³½«Êä³öÖ¸¶¨ÎļþµÄÍêÕû·¾¶ £¬ÀýÈ磺

/home/user/Documents/filename

µÇ¼ºó¸´ÖÆ

ʹÓÃreadlinkÏÂÁîÏÔʾ·ûºÅÁ´½ÓµÄÍêÕû·¾¶

ÈôÊÇÎļþÊÇÒ»¸ö·ûºÅÁ´½Ó £¬¿ÉÒÔʹÓÔreadlink”ÏÂÁîÀ´ÏÔʾ·ûºÅÁ´½ÓµÄÍêÕû·¾¶¡£ÒÔÏÂÊÇÒ»¸öʾÀý´úÂ룺

readlink symlink

µÇ¼ºó¸´ÖÆ

ÆäÖÐ £¬”symlink”ΪÐèÒªÏÔʾÍêÕû·¾¶µÄ·ûºÅÁ´½Ó¡£ÔËÐÐÒÔÉÏÏÂÁî £¬ÏµÍ³½«Êä³ö·ûºÅÁ´½ÓµÄÍêÕû·¾¶ £¬ÀýÈ磺

/home/user/Documents/target-file

µÇ¼ºó¸´ÖÆ

×ܽá

ͨ¹ýÒÔÉÏÏÈÈÝ £¬ÎÒÃÇÏàʶÁËÔÚLinuxϵͳÖÐÔõÑùÏÔʾÎļþµÄÍêÕû·¾¶¡£Í¨¹ýʹÓÔpwd”ÏÂÁî¿ÉÒÔÏÔʾĿ½ñÊÂÇéĿ¼µÄÍêÕû·¾¶ £¬¶øʹÓÔrealpath”ºÍ”readlink”ÏÂÁî¿ÉÒÔÏÔʾָ¶¨ÎļþºÍ·ûºÅÁ´½ÓµÄÍêÕû·¾¶¡£ÕâЩÏÂÁî¹ØÓÚ¶¨Î»ÎļþλÖᢾÙÐÐÎļþ²Ù×÷ºÍÖÎÀí¶¼ºÜÊÇÓÐÓá£Ï£ÍûÒÔÉÏÄÚÈÝÄܶÔÄãÓÐËù×ÊÖú¡£

ÒÔÉϾÍÊÇÔÚLinuxÖÐÔõÑùÉó²éÎļþµÄ¾ø¶Ô·¾¶µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±ÊµÊ±ÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

13452372176

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿