본문 바로가기

카테고리 없음

리눅스 - 시스템 파일 설정 및 사용중인 파일 보기


리눅스에서 설정된 파일 정보 보기

* Open File Check

  • GNU/Linux - How Many Open Files?

    # cat /proc/sys/fs/file-nr

    3391 969 52427
    | | |
    | | |
    | | maximum open file descriptors
    | total free allocated file descriptors
    total allocated file descriptors
    (the number of file descriptors allocated since boot)

  • Linux / UNIX: List Open Files for Process


    1. obtain process id:

    # ps | grep {program-name}
    or
    # ps -C {program-name} -o pid=

    2. list files

    # ls -l /proc/pid/fd
    or
    # lsof | grep pid | wc -l