Why does lsof fail to list files I have open. For example I open with the text editor some file in my home directory.
$ gedit ~/.python_history
lsof
does not even work as root
$ sudo lsof | grep python_history
does not list anything. Why?
Editing and saving the file does not make a difference either. Running the python interpreter does not make a difference either.
$ lsof | grep gedit
does list a bunch of files, but not those I am editing.
vim
and you'll see that the file.python_history.swp
is listed bylsof