pwd

김무무·2023년 6월 11일

pwd(print working directory)

현재 위치해있는 디렉토리의 주소를 출력한다.


사용법

pwd [옵션]

옵션

  • pwd
    현재 디렉토리의 주소 출력
[root@Linux ~]# cd /etc
[root@Linux etc]# pwd
/etc

  • pwd -L (Logical)
    경로에 심볼릭 링크 파일이 포함되어 있을 경우 링크 파일의 경로 출력. pwd의 기본값.
     
  • pwd -P (Physical)
    경로에 심볼릭 링크 파일이 포함되어 있으면 링크 파일이 아닌 원본 파일의 경로를 출력.
[root@Linux /]# ls -l
total 28
lrwxrwxrwx.   1 root root    7 Apr 28 11:34 A_2 -> /test/A
...
[root@Linux /]# cd A_2
[root@Linux A_2]# pwd -L
/A_2
[root@Linux A_2]# pwd -P
/test/A

설명

가장 많이 사용하는 명령어중 하나. 사용법이 매우 단순하다.

profile
김무무입니다

0개의 댓글