尊龙凯时人生就是博

ѧ»áÔÚLinuxÖÐÉó²éÄ¿½ñ·¾¶

ÎÊÌ⣺ѧ»áÔÚLinuxÖÐÉó²éÄ¿½ñ·¾¶µÄÒªÁì¼°´úÂëʾÀý

ÔÚLinux²Ù×÷ϵͳÖÐ £¬¾­³£ÐèÒªÉó²éÄ¿½ñËùÔڵķ¾¶ £¬ÒÔ±ã¸üºÃµØ¶¨Î»ºÍ²Ù×÷ÎļþºÍĿ¼¡£±¾ÎĽ«ÏÈÈÝÔÚLinuxÖÐÉó²éÄ¿½ñ·¾¶µÄ¼¸ÖÖÒªÁì £¬²¢ÌṩÏêϸµÄ´úÂëʾÀý¡£Ï£ÍûÄÜ×ÊÖú¶ÁÕßÔ½·¢ÊìÁ·µØÔÚLinuxÇéÐÎÖоÙÐз¾¶²Ù×÷¡£

1. ʹÓÃpwdÏÂÁî

pwdÊÇPrint Working DirectoryµÄËõд £¬ÓÃÓÚÏÔʾĿ½ñÊÂÇéĿ¼µÄÍêÕû·¾¶¡£Í¨¹ýÔÚÖÕ¶ËÊäÈëpwdÏÂÁî £¬¼´¿ÉÏÔʾĿ½ñ·¾¶¡£

ʾÀý´úÂ룺

pwd

µÇ¼ºó¸´ÖÆ

2. ʹÓÃechoÏÂÁî

echoÏÂÁîÓÃÓÚÏÔʾһÐÐÎı¾ £¬²¢¿É½«Îı¾Öض¨Ïòµ½ÎļþÖС£µ±ÍŽá$PWDÇéÐαäÁ¿Ê¹ÓÃʱ £¬Ò²¿ÉÒÔÏÔʾĿ½ñ·¾¶¡£

ʾÀý´úÂ룺

echo $PWD

µÇ¼ºó¸´ÖÆ

3. ʹÓÃreadlinkÏÂÁî

readlinkÏÂÁî¿ÉÒÔÏÔʾ·ûºÅÁ´½ÓµÄÄ¿µÄ·¾¶¡£µ±ÍŽá-fÑ¡ÏîʹÓÃʱ £¬¿ÉÒÔ»ñÈ¡Ä¿½ñ¾ø¶Ô·¾¶¡£

ʾÀý´úÂ룺

readlink -f .

µÇ¼ºó¸´ÖÆ

4. ʹÓÃdirnameÏÂÁî

dirnameÏÂÁîÓÃÓÚÈ¥µô×îºó²ã¼¶µÄ·¾¶ £¬²¢Êä³öÉÏÒ»²ãµÄĿ¼¡£ÍŽá$PWDÇéÐαäÁ¿Ê¹ÓÃʱ £¬¿ÉÒÔÏÔʾĿ½ñ·¾¶¡£

ʾÀý´úÂ룺

dirname $PWD

µÇ¼ºó¸´ÖÆ

5. ʹÓÃpwdxÏÂÁî

pwdxÏÂÁî¿ÉÒÔÏÔʾָ¶¨Àú³ÌµÄÊÂÇéĿ¼¡£Í¨¹ý½«Ä¿½ñÀú³ÌµÄPID£¨Process ID£©×÷Ϊ²ÎÊýת´ï¸øpwdxÏÂÁî £¬¼´¿ÉÏÔʾĿ½ñÀú³ÌµÄÊÂÇéĿ¼¡£

ʾÀý´úÂ룺

pwdx $(echo $$)

µÇ¼ºó¸´ÖÆ

ÒÔÉÏÊǼ¸ÖÖÔÚLinuxÖÐÉó²éÄ¿½ñ·¾¶µÄÒªÁì¼°´úÂëʾÀý¡£Í¨¹ýÊìÁ·ÕÆÎÕÕâЩҪÁì £¬½«Äܹ»Ô½·¢Àû±ãµØÔÚLinuxϵͳÖоÙÐз¾¶²Ù×÷ £¬Ìá¸ßÊÂÇéЧÂÊ¡£Ï£Íû¶ÁÕßͨ¹ýʵ¼ùÔËÓÃÕâЩҪÁì £¬Äܹ»ÔÚLinuxÇéÐÎÏÂÔ½·¢¼ÝÇá¾ÍÊìµØ¾ÙÐÐÎļþºÍĿ¼ÖÎÀí¡£

ÒÔÉϾÍÊÇѧ»áÔÚLinuxÖÐÉó²éÄ¿½ñ·¾¶µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

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

18523999891

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

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

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