Mac
[Mac] 리눅스 which, where, locate 명령어 설명
BONiii
2020. 8. 18. 10:57
which
which는 특정명령어의 위치를 찾아주는 명령어이다.
which find
> /bin/find
검색 가능한 모든 경로에서 해당 명령어를 찾음
which -a find
> /bin/find
/usr/bin/find
where
whereis는 명령어의 실행파일위치, 소스위치, man 페이지파일의 위치를 찾아주는 명령어이다.
whereis find
> find: /bin/find /usr/bin/find /usr/share/man/man1/find.1.gz
locate
locate는 다양한 패턴의 파일들을 찾고자 할 때 매우 유용하게 사용되는 명령어이다.
현재 시스템에 존재하는 *.bak 에 해당하는 파일 찾기
locate *.bak
특정패턴에 해당하는 파일들 가운데 지정한 개수만큼 검색
locate -n 10 *.conf
https://webdir.tistory.com/158
리눅스 which, whereis, locate - 명령어의 경로 확인
각종 파일과 디렉토리등의 경로 확인에 자주 사용되는 명령어를 살펴봅니다. which which는 특정명령어의 위치를 찾아주는 명령어이다. which find /bin/find 검색 가능한 모든 경로에서 해당 명령어를 �
webdir.tistory.com