UNIX/유닉스 공통
리눅스 명령어 위치 확인
99iberty
2013. 4. 17. 14:27
목차[숨기기] |
방법 1: which
- 명령어
which 명령어
- 실행 예시
[root@jmnote ~]# which ifconfig
/sbin/ifconfig
[root@jmnote ~]# which httpd
/usr/sbin/httpd
→ ifconfig는 /sbin에, httpd는 /usr/sbin에 설치되어 있다.
방법 2: whereis
- 명령어
whereis 명령어
- 실행예시
[root@jmnote ~]# whereis ifconfig
ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz
[root@jmnote ~]# whereis httpd
httpd: /usr/sbin/httpd /usr/sbin/httpd.worker /usr/sbin/httpd.event /etc/httpd /usr/lib64/httpd /usr/include/httpd /usr/share/man/man1/httpd.1.gz /usr/share/man/man8/httpd.8.gz
방법 3: find
리눅스 파일 찾기 문서를 참고하십시오.
모든 폴더를 다 찾아보기 때문에 위 방법들에 비해 오래 걸린다.
- 명령어
find / -name 명령어
- 실행예시
[root@jmnote ~]# find / -name ifconfig
/sbin/ifconfig