dest-unreach / socat / contrib / socat-filan
filan is a utility, distributed with socat, that prints information about files or file descriptors. It has been written for debugging socat, but might be useful for other purposes too.
Luigi Iotti improved filan. Here is his original description:
I am using filan to learn a little more about linux internals, and I would like 2 little more functionalities. The first option , -o<name> , can be used to send the output of filan to something different than stdout. I wrote this because when I was doing "filan > file" I was changing the output of filan, not only the place where the output was going. The argument to the option can be: the special cases stdin, stdout, stderr +num in this case the file descriptor num is used via fdopen a name, interpreted as a file name. The other option, -c, is used to change a little the output of filan. For example, if on my system I issue "filan < /dev/sda" I obtain in the device row 2053 and in the rdev 8,0. I wanted a coherent visualization, in the form Major,minor. I added the -c option to accomplish this.
Apply this patch to socat 126.96.36.199 source.
This patch does not conflict with socat pty patch
Extract the socat 188.8.131.52 source:
tar xzvf socat-184.108.40.206.tar.gz
change to the source directory:
apply the patch:
gunzip <../filan.lux.patch.gz |patch
Luigi's example unveils a bug in filan that is not fixed in socat 220.127.116.11:For handling of file system entries, filan requires read permission on the file but search+read access to the directory would suffice.