728x90

디렉토리 구조

[Linux Directory Structure Explained for Beginners]

https://linuxhandbook.com/linux-directory-structure/

 

Linux Directory Structure Explained for Beginners

This tutorial explains the Linux directory structure. You'll learn the Linux filesystem hierarchy along with the purpose of the various directories on a Linux system.

linuxhandbook.com

잘 정리된 글을 읽어봅시다

  1. / - Root
  2. /bin - User Binaries
  3. /sbin - System Binaries
  4. /etc - Configuration(설정) Files
  5. /dev - Divice File
  6. /proc - Process Information
  7. /var - Variable Files
  8. /tmp - Temporary Files
  9. /usr - User Programs
  10. /home - Home Directories
  11. /boot - Boot Loader Files
  12. /lib - System Libraries
  13. /opt - Optional add-on Applications
  14. /mnt - Mount Directory
  15. /media - Removable Media Devices
  16. /srv - Service Data

파일 찾는 법

locate & find

locate는 디렉토리를 찾지 않고 미리 정리된 데이터베이스(mlocate)에서 파일을 찾는다.

locate [찾고자 하는 파일명]

find는 직접 디렉토리를 찾는다. locate보다 성능이 떨어질 수 있으나 현재상태를 가져올 수 있고 다양한 사용법이 있다.

https://www.tecmint.com/35-practical-examples-of-linux-find-command/

 

35 Practical Examples of Linux Find Command

The Linux Find Command is one of the most important and frequently used command command-line utilities to search and locate the list of files and directories.

www.tecmint.com

자세한 사용법은 위의 글을 읽어봅시다.

whereis & $PATH

whereis : 파일이 위치한 디렉토리를 보여준다.

$PATH : $PATH에 저장된 디렉토리들을 검색해서 명령어가 있으면 바로 실행할 수 있도록 해준다. 예를 들어 경로 /bin/ls라고 다 치지 않고 ls라고만 쳐도 명령이 실행된다.

+ Recent posts