ÔõÑùÔÚLinuxÖÐÉó²éÄ¿½ñ·¾¶£¿
ÔõÑùÔÚLinuxÖÐÉó²éÄ¿½ñ·¾¶£¿
ÔÚLinux²Ù×÷ϵͳÖУ¬Éó²éÄ¿½ñ·¾¶ÊǷǾ³£¼ûµÄ²Ù×÷£¬¿ÉÒÔ×ÊÖúÎÒÃÇÈ·ÈÏÄ¿½ñËùÔÚµÄÎļþ¼ÐλÖá£Í¨¹ýһЩ¼òÆÓµÄÏÂÁÎÒÃÇ¿ÉÒÔÀû±ãµØÕÒµ½Ä¿½ñËùÔÚ·¾¶¡£
ʹÓÃpwdÏÂÁî
ÔÚLinuxÖУ¬¿ÉÒÔʹÓÃpwdÏÂÁîÀ´Éó²éÄ¿½ñËùÔÚ·¾¶¡£pwdÊÇ¡°print working directory¡±µÄËõд£¬ÒâΪ¡°´òÓ¡ÊÂÇéĿ¼¡±¡£Í¨¹ýÔÚÖÕ¶ËÖÐÊäÈëpwdÏÂÁϵͳ»á·µ»ØÄ¿½ñ·¾¶µÄ¾ø¶Ô·¾¶ÐÅÏ¢¡£
ʾÀý´úÂ룺
pwd
µÇ¼ºó¸´ÖÆ
Ö´ÐиÃÏÂÁîºó£¬ÏµÍ³»á·µ»ØÄ¿½ñËùÔÚ·¾¶µÄ¾ø¶Ô·¾¶£¬È磺/home/user/Documents¡£
ʹÓÃechoÏÂÁîÍŽáPWDÇéÐαäÁ¿
³ýÁËʹÓÃpwdÏÂÁîÍ⣬»¹¿ÉÒÔͨ¹ýÍŽáechoÏÂÁîºÍ$PWDÇéÐαäÁ¿À´Éó²éÄ¿½ñ·¾¶¡£
ʾÀý´úÂ룺
echo $PWD
µÇ¼ºó¸´ÖÆ
Ö´ÐиÃÏÂÁîºó£¬ÏµÍ³Í¬Ñù»á·µ»ØÄ¿½ñËùÔÚ·¾¶µÄ¾ø¶Ô·¾¶¡£
ʹÓÃcdÏÂÁîÀÍÆÈ´»µ½Ä¿½ñ·¾¶ºóÔÙʹÓÃpwdÏÂÁî
ÔÚLinuxϵͳÖУ¬¿ÉÒÔͨ¹ýcd .ÏÂÁîÀÍÆÈ´»µ½Ä¿½ñ·¾¶£¬È»ºóÔÙʹÓÃpwdÏÂÁîÉó²éÄ¿½ñ·¾¶¡£
ʾÀý´úÂ룺
cd . pwd
µÇ¼ºó¸´ÖÆ
Ö´ÐÐÒÔÉÏÁ½ÌõÏÂÁîºó£¬ÏµÍ³Í¬Ñù»á·µ»ØÄ¿½ñËùÔÚ·¾¶µÄ¾ø¶Ô·¾¶¡£
×ܽ᣺
ͨ¹ýÉÏÊöÈýÖÖÒªÁ죬ÎÒÃÇ¿ÉÒÔÔÚLinuxϵͳÖÐÀû±ãµØÉó²éÄ¿½ñËùÔÚ·¾¶¡£ÕâЩÏÂÁî¼òÆÓÀû±ã£¬¿ÉÒÔ×ÊÖúÎÒÃÇ¿ìËÙÈ·ÈÏ×Ô¼ºËùÔÚµÄÊÂÇéĿ¼£¬Ìá¸ßÊÂÇéЧÂÊ¡£Ï£ÍûÒÔÉÏÄÚÈݶÔÄúÓÐËù×ÊÖú¡£
ÒÔÉϾÍÊÇÔõÑùÔÚLinuxÖÐÉó²éÄ¿½ñ·¾¶£¿µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡