'이전 디렉토리'에 해당되는 글 1건

  1. 2010.09.19 bash - 이전 디렉토리로 이동하기 move to previoud directory 2
Linux2010. 9. 19. 21:44
완전 다른 디렉토리로 이동할때 가끔 이전의 경로로 돌아가고 싶은 때가 있다.
귀찮지만 일일이 치곤했는데, 귀차니즘(실은 모토쿼티에서 일일이 치긴 곤혹이라..) 때문에 다시 찾아보니
간단한 해결 방법이 있었다.

 cd $OLDPWD
 cd -

두가지 모두 bash 쉘에서 작동을 한다.
그래도 cd - 가 타수가 적어지니 더 편한듯!


OLDPWD
The previous working directory as set by the cd command.

[링크 : http://linux.die.net/man/1/bash]

you can go back to the previous directory without having to type in the entire directory path by using the command “cd –”.

[링크 : http://techie-buzz.com/.../how-to-go-back-to-previous-directory...putty.html]


'Linux' 카테고리의 다른 글

POSIX - Portable Operating System Interface [for Unix]  (6) 2010.09.21
커널의 종류(kind of kernels)  (0) 2010.09.21
mkinitramfs  (0) 2010.09.19
top (1) - load average ?  (4) 2010.09.12
curl  (0) 2010.09.11
Posted by 구차니