How to check the process is already running or not
- by TechGuru
I want to check the particular process in already running or not.
I refereed this Q&A.
But I didn't get any specific solution. Following is the example that I tried:
I have created abc.sh file and run this script on background, like sh abc.sh &.
Now this file is running on background and I fire the ps aux | grep "abc" command.
Following is the output of this command:
prakash 3594 0.0 0.0 4388 820 pts/0 S+ 16:44 0:00 grep --color=auto abc
After that I stop the abc.sh running script and fire the same command ps aux | grep "abc" command.
But I am getting same output like:
prakash 3594 0.0 0.0 4388 820 pts/0 S+ 16:44 0:00 grep --color=auto abc
Is there any other way to find the process is running or not?