I opened a file through python. So, i did a lsof on the python process. output of lsof has the following line
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
python 15855 inaflash 3w REG 0,25 0 4150810088 /home/inaflash/he.txt
Thing is, it has 3w
. which means that the file is open for writing. But, i actually opened the file as follows
a = open('he.txt','r')
I read that, w
means file is open for write. Can anyone help me understand why its w
instead of r