COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
webalizer 32342 ctxmortg 5uW REG 8,17 12288 32890954 /home2/ctxmortg/tmp/webalizer/eyebestdatedotcomauph.ctxmortgagemortgagerefi.com/dns_cache.db
FD - File Descriptor
If you are looking for file being written, look for following flag
# - The number in front of flag(s) is the file descriptor number of used by the process to associated with the file
u - File open with Read and Write permission
r - File open with Read permission
w - File open with Write permission
W - File open with Write permission and with Write Lock on entire file
mem - Memory mapped file, usually for share library
So 3r
means webalizer has a descriptor number 3 associated with ...dns_cache.db
, with read permission.
TYPE - File Type
In Linux, almost everything are files, but with different type.
REG - REGgular file, file that show up in directory
DIR - Directory
NODE
inode number in filesystem
You can find complete details in the man page.
Types starting with V are virtual types. That is, there is no corresponding inode on any physical disk but only a vnode in a virtual filesystem (like /proc). It seems those types only belong to BSD-like systems (AIX, Darwin, FreeBSD, HPUX, Sun etc.) and won't occur on a Linux system. As with the non-virtual types, DIR stands for directory and REG for a regular file.
I couldn't find the meaning of GDIR and GREG as they even don't appear in the lsof source code. But I guess they just stand for the non-virtual (generic?) directories and files.
Best Answer
Since you have not given any information on where you see this I will assume you are running GNU
lsof
with no arguments and you see0t0
in theSIZE/OFF
column. This, by default, shows the size of the file in question.However, for "special" files, it gives the offset instead. From the
lsof
man page:In other words,
0t
signifies decimal notation and0t0
means a file with size 0 in decimal notation. You can confirm by having a look at what files have that size (this is run on a Debian box):You will see that all files with that reported size will be things like sockets, pipes, open TCP connections, devices and the like.