Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.03 KB

find-command.md

File metadata and controls

43 lines (28 loc) · 1.03 KB

Ways to find command

type

파일 위치, bash builtinalias 명령어 여부 등의 정보를 알려줍니다.

$ type ifconfig
ifconfig is /sbin/ifconfig

which

실행 파일의 위치를 찾으며, alias 명령어가 있다면 먼저 알려줍니다.

-a 옵션은 검색 가능한 모든 경로에서 해당 명령어를 찾습니다.

$ which ls
/bin/ls

$ which -a ls
/bin/ls
/mnt/shared/sbin/ls

bash builtin 명령어는 보이지 않습니다.

whereis

binary, source, manual page의 위치를 알려줍니다.

$ whereis  ifconfig
ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz

bash builtinalias 명령어는 보이지 않습니다.

Reference

제타위키, 리눅스 명령어 위치 확인
흉내쟁이, 리눅스 which, whereis, locate - 명령어의 경로 확인