尊龙凯时人生就是搏

LinuxÏÂÁÏÔʾÎļþµÄÍêÕû·¾¶

LinuxÏÂÁÏÔʾÎļþµÄÍêÕû·¾¶

ÔÚLinuxϵͳÖУ¬ÓÐʱÎÒÃÇÐèÒªÉó²éÎļþµÄÍêÕû·¾¶£¬ÒÔ±ã¾ÙÐвÙ×÷»ò¶¨Î»ÎļþλÖᣱ¾ÎĽ«ÏÈÈÝÔõÑùʹÓÃLinuxÏÂÁîÀ´ÏÔʾÎļþµÄÍêÕû·¾¶£¬Í¬Ê±ÌṩÏêϸµÄ´úÂëʾÀý¡£

1. ʹÓÃrealpathÏÂÁî

realpathÏÂÁî¿ÉÒÔÓÃÀ´»ñÈ¡ÎļþµÄ¾ø¶Ô·¾¶£¬¼´ÍêÕû·¾¶¡£ÏÂÃæÊÇʹÓÃrealpathÏÂÁîµÄʾÀý£º

realpath ÎļþÃû

µÇ¼ºó¸´ÖÆ

ÀýÈ磬ÈôÊÇÎÒÃÇÐèÒªÉó²éÎļþÃûΪexample.txtµÄÍêÕû·¾¶£¬¿ÉÒÔÊäÈëÒÔÏÂÏÂÁ

realpath example.txt

µÇ¼ºó¸´ÖÆ

Ö´ÐиÃÏÂÁîºó£¬Öն˻áÊä³öexample.txtÎļþµÄÍêÕû·¾¶£¬ÀýÈç/home/user/documents/example.txt¡£

2. ʹÓÃreadlinkÏÂÁî

ÁíÒ»¸ö³£ÓõÄÏÂÁîÊÇreadlink£¬Ëü¿ÉÒÔÓÃÀ´ÏÔʾ·ûºÅÁ´½ÓËùÖ¸ÏòµÄÄ¿µÄÎļþµÄ·¾¶¡£Ê¾ÀýÈçÏ£º

readlink -f ÎļþÃû

µÇ¼ºó¸´ÖÆ

¼ÙÉèÎÒÃÇÓÐÒ»¸öÃûΪlink.txtµÄ·ûºÅÁ´½ÓÖ¸Ïòtarget.txtÎļþ£¬ÈôÊÇÎÒÃÇÏë»ñÈ¡target.txtÎļþµÄÍêÕû·¾¶£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ

readlink -f link.txt

µÇ¼ºó¸´ÖÆ

Ö´ÐиÃÏÂÁîºó£¬Öն˻áÊä³ötarget.txtÎļþµÄÍêÕû·¾¶¡£

3. ʹÓÃpwdÏÂÁî

pwdÏÂÁîͨ³£ÓÃÓÚÏÔʾĿ½ñÊÂÇéĿ¼µÄ·¾¶£¬µ«ÍŽáfindÏÂÁҲ¿ÉÒÔÓÃÀ´ÏÔʾָ¶¨ÎļþµÄÍêÕû·¾¶¡£Ê¾ÀýÈçÏ£º

find `pwd` -name ÎļþÃû

µÇ¼ºó¸´ÖÆ

¼ÙÉèÎÒÃÇÏëÕÒµ½Ä¿½ñÊÂÇéĿ¼¼°Æä×ÓĿ¼ÏÂÃûΪexample.txtµÄÎļþ·¾¶£¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ

find `pwd` -name example.txt

µÇ¼ºó¸´ÖÆ

Ö´ÐиÃÏÂÁîºó£¬Öն˻áÊä³öexample.txtÎļþµÄÍêÕû·¾¶¡£

½áÓï

ͨ¹ýÉÏÊöʾÀý£¬ÎÒÃÇÏàʶÁËÔÚLinuxϵͳÖÐÔõÑùʹÓÃrealpath¡¢readlinkºÍpwdÏÂÁîÀ´ÏÔʾÎļþµÄÍêÕû·¾¶¡£ÕâЩÏÂÁîÄܹ»×ÊÖúÎÒÃÇÀû±ãµØ²éÕÒÎļþµÄλÖ㬾ÙÐÐÏà¹Ø²Ù×÷¡£Ï£Íû±¾ÎĶÔÄúÓÐËù×ÊÖú£¡

ÒÔÉϾÍÊÇLinuxÏÂÁÏÔʾÎļþµÄÍêÕû·¾¶µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

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

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

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