4

I made a python script running on background:

nohup python app.py &

then close the terminal, a few days later, I want to see this job, so I run

jobs

there list no jobs, but I'm sure the script app.py is still running.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Mil0R3
  • 3,876
  • 4
  • 33
  • 61

1 Answers1

4

jobs will only give you a list of process running under the session group of the bash shell. nohup processes run in their own session group. There are a number of simple commands you can run to check if your nohup'd process is still running, the simplest being lsof | grep nohup (this command may take a few seconds to run)

Community
  • 1
  • 1
Gearoid Murphy
  • 11,834
  • 17
  • 68
  • 86