lsof 출력을 볼 때 "0t0"은 무엇을 의미합니까?

lsof 출력을 볼 때 "0t0"은 무엇을 의미합니까?

lsof 출력을 볼 때 "0t0"은 무엇을 의미합니까?

답변1

lsof당신이 이것을 어디서 봤는지에 대한 어떤 정보도 제공하지 않았기 때문에 나는 당신이 인수 없이 GNU를 실행하고 있고 0t0칼럼에서 SIZE/OFF이것을 보았다고 가정할 것입니다 . 기본적으로 관련 파일의 크기가 표시됩니다.

그러나 "특수" 파일의 경우 오프셋을 제공합니다. ~에서lsof 매뉴얼 페이지:

SIZE, SIZE/OFF, or OFFSET
   is the size of the file or the file offset in bytes. A value is displayed in
   this column only if it is available. Lsof displays whatever value - size or 
   offset - is appropriate for the type of the file and the version of lsof. 
On some UNIX dialects
    lsof can't obtain accurate or consistent file offset information from its
    kernel data sources, sometimes just for particular kinds of files (e.g., 
   socket files.) In other cases, files don't have true sizes - e.g., sockets, 
   FIFOs, pipes - so lsof displays for their sizes the content amounts it finds in 
   their kernel buffer descriptors (e.g., socket buffer size counts or TCP/IP 
   window sizes.) Consult the lsof FAQ (The FAQ section gives its location.) for 
   more information. 
The file size is displayed in decimal;
    the offset is normally displayed in decimal with a leading ''0t'' if it 
   contains 8 digits or less; in hexadecimal with a leading ''0x'' if it is 
   longer than 8 digits. (Consult the -o o option description for information 
   on when 8 might default to some other value.) 
Thus the leading ''0t'' and ''0x'' identify an offset when the column
    may contain both a size and an offset (i.e., its title is SIZE/OFF). 

즉, 0t10진수를 표현한다는 것은 0t010진수 크기가 0인 파일을 의미합니다. 해당 크기의 파일을 살펴보면 이를 확인할 수 있습니다(Debian 시스템에서 실행 중임).

lsof | grep 0t0 | awk '{print $(NF-2),$NF}' | sort -u

이 보고된 크기의 모든 파일은 소켓, 파이프, 개방형 TCP 연결, 장치 등임을 알 수 있습니다.

관련 정보