Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 독서
- 객체지향
- docker
- Java
- 성수
- 클린코드
- 개발자
- 주니어개발자
- JavaScript
- 깨끗한코드
- 책너두
- 성수맛집
- IntelliJ
- 객체지향프로그래밍
- 성수볼거리
- 헤드퍼스트
- JAVA개발자
- 성수핫플
- 코딩
- Linux
- 성수직장인
- 직장인점심
- 오브젝트
- 상속
- 책읽기
- 헤드퍼스트디자인패턴
- 독서일지
- 직장인
- 디자인패턴
- DesignPattern
Archives
- Today
- Total
닭발개발
[Linux] $ pwd --version 했을 때, invalid option 뜨는 이유 본문
728x90
$ pwd --version 을 하면 invalid option이라고 뜬다.
test@test319:/mnt/c/WINDOWS/system32$ pwd --version
-bash: pwd: --: invalid option
pwd: usage: pwd [-LP]
원인
pwd의 위치를 보면
test@test319:/mnt/c/WINDOWS/system32$ which pwd
/usr/bin/pwd
/usr/bin/pwd --version 하면 오류 없이 잘 된다.
test@test319:/mnt/c/WINDOWS/system32$ /usr/bin/pwd --version
pwd (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Jim Meyering.
$ pwd --version 와 $ /usr/bin/pwd --version 둘의 차이는?
리눅스 shell 명령어에는 우선순위가 있다.
Alias => Function => Built in => Executable File 순으로 실행되는데,
그냥 $ pwd --version 은 Build in된 pwd를 실행한 거고,
/usr/bin/pwd 의 pwd 를 실행해야 하기 때문에 절대경로를 명시해 줘야 한다.
728x90
반응형
'Linux' 카테고리의 다른 글
[Linux] jar 파일 실행하는 shell script 뜯어보며 작성하기 (0) | 2023.11.09 |
---|---|
[Linux] tar / tar.gz / zip 압축 및 압축 해제 (0) | 2023.09.12 |
[Linux] scp 이용하여 다른 서버로 파일 보내기(단일파일, 복수파일, 디렉토리) (0) | 2023.08.29 |
[Linux] find 명령어 (파일 찾기, 검색) (0) | 2023.08.22 |
[Linux] 개발 서버에 띄운 backend의 로그 볼 때 (0) | 2023.08.07 |