Why am I unable to find the pid of a nano process that has a file being edited by root?

5,995

Solution 1

Try to use ps aux | grep nano and pidof nano to check if that process actually exists. If not try to find nano temporary file in the same location as your file. It should be name like that: file.save.

Solution 2

The following information should help. 1. Are you using top to find the pid of the process. How are you trying to get it. 2. Have your tried to get the process status. Try ps -ef |grep *Pid shown*

Update your question for further dig at it.

Share:
5,995

Related videos on Youtube

Dark Star1
Author by

Dark Star1

The true mind can weather all the lies and illusions without being lost. The true heart can toughen the poison of hatred without being harmed. Since beginning-less time, darkness thrives in the void, but always yields to purifying light.

Updated on September 18, 2022

Comments

  • Dark Star1
    Dark Star1 over 1 year

    I am trying to edit a file using nano and whenever I open the file for editing it gives me the following message:

    File /path/to/file is being edited (by root with nano 2.5.3. PID 12345); continue?
    

    Yet I can not find the process id in the list of running processes when I grep the pid or when I list all processes. I am unsure as to how to get to the bottom of this. I'm on an ubuntu 16.04 VM.

  • Michael Hampton
    Michael Hampton almost 3 years
    Vim uses .swp files, not nano.
  • Yalid Fuentes
    Yalid Fuentes almost 3 years
    I don't use vim, however nano created a .swp file. I have seen it multiple times.