by shigemk2

当面は技術的なことしか書かない

memo lsof

memo lsof

FD(ファイルディスクリプタ)の読み方と、TYPEの読み方。だいたい読んだら分かるかも。size/offは

FD – stands for File descriptor and may seen some of the values as:

cwd current working directory
rtd root directory
txt program text (code and data)
mem memory-mapped file

 
Also in FD column numbers like 1u is actual file descriptor and followed by u,r,w of it’s mode as:

r for read access.
w for write access.
u for read and write access.
TYPE – of files and it’s identification.

DIR – Directory
REG – Regular file
CHR – Character special file.
FIFO – First In First Out

size/offについては、manにこんなことが書いてあった

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.