ã³ãã³ãè¡ã·ã§ã«ã§ä½æ¥ãã£ã¬ã¯ããªãæ»ãä½æ¥ã«ã¤ãã¦
cdã³ãã³ãã§ã¯ãã£ã¬ã¯ããªã1ã¤ã ãæ»ãã
cdã³ãã³ãã«ããä½æ¥ãã£ã¬ã¯ããªã®ç§»åã¯ã1ã¤åã«ãããã£ã¬ã¯ããªã«éã£ã¦
$ cd -
ã§æ»ããã¨ãã§ããããã ããæ´ã«1ã¤åã«æ»ããã¨ãã¦ããã¾ãããããéã«é²ãã§ãã¾ãã
[~]$ cd /usr/src/linux/ [/usr/src/linux]$ cd /tmp/ [/tmp]$ cd - [/usr/src/linux]$ cd - [/tmp]$
ä¸ã®ä¾ã§ã¯ã~ --> /usr/src/linux <--> /tmpãã¨åãããcd -ããç¹°ãè¿ãã¨ãæå¾ã®2ã¤ã®ãã£ã¬ã¯ããªãè¡ã£ããæ¥ããããã
pushdã¨popd
pushdã¨popdã¯ããã©ã£ããã£ã¬ã¯ããªãã·ã§ã«ã®å
é¨ã«è¨é²ããªãã移åãè¡ãã
ãããã¯cdã¨åæ§ãã¨ãã«ã·ã§ã«ã®çµã¿è¾¼ã¿ã³ãã³ãã§ãbash/tcsh/zshã®ãããã®ã·ã§ã«ã対å¿ãã¦ããããã ããä½æ©è½è»½éã·ã§ã«ã®dashã¯ä¾å¤ã§ããããã®ã³ãã³ãã«ã¯å¯¾å¿ãã¦ããªããã¾ããWineã®CLIã·ã§ã«(cmd.exe)ã§ã使ããããã ã*1
使ãæ¹ã¨ãã¦ã¯
- æ°ãããã£ã¬ã¯ããªã«ç§»åããã¨ãã«(cdã®æè¦ã§)移åå ãã£ã¬ã¯ããªãå¼æ°ã«æå®ãã¦pushd
- æ»ãããã¨ãã«popd
ã¨ãªãã
移åãããã£ã¬ã¯ããªã®è¨é²ã¯ãæ°ãããã£ã¬ã¯ããªã«pushdã§ç§»åããã¨è¿½å ããããã®å¾ã§popdãå®è¡ããã¨1ã¤åã®ãã£ã¬ã¯ããªã«æ»ããæ»ã£ãåã®è¨é²ã¯æ¶ãããWebãã©ã¦ã¶ã®ãæ»ãããé²ããã®ãã©ãæ¹ã¨ã¯ç°ãªããä¸åº¦æ»ã£ãå¾ã§åã³é²ã¿ç´ãã¨ãããã¨ã¯ã§ããªãã
ãã¼ã¿ã®æ§é ã¨ãã¦ã¯ãç©ã¿ä¸ãã¦ä¸ããåãåºãã¹ã¿ãã¯ã¨ããå½¢ãã¨ãã
é¢é£URL:
ä¸ã¯å®è¡ä¾ã
[~]$ pushd /usr/src/linux /usr/src/linux ~ [/usr/src/linux]$ pushd /tmp/ /tmp /usr/src/linux ~ [/tmp]$ popd /usr/src/linux ~ [/usr/src/linux]$ popd ~ [~]$
ãã®å ´åã~ --> /usr/src/linux --> /tmpãã®å¾ã~ <-- /usr/src/linux <-- /tmpãã¨åãã¦ããã
使ç¨ãããã¼ã¸ã§ã³:
*1:Windowsã®ã³ãã³ãããã³ããã§ã使ããããã