When I execute ps ax command with grep, it' showing a single entry of test.py

test.py was just single print statement submitted like this:

nohup python test.py & 

So I'm assuming it didn't take long to run. Should that entry still be there?

$ ps ax | grep test.py
18225 pts/0    S+     0:00 grep test.py
  • 1
    Your ps is showing the grep process that's filtering the ps output for test.py, not a python process running the thing... – Andy Dalton May 23 at 19:47
  • How can I tell the difference between a running process that was found with grep versus the filtering? – Rod May 23 at 19:51
  • How can I tell the difference... One will say grep, the other will say python. See the above suggested link re grep -v grep – Andy Dalton May 23 at 23:14
  • Actually, it is a direct duplicate of unix.stackexchange.com/q/176749/5132 . – JdeBP May 24 at 2:10