How can I run the same program two times or more with different names when calling ps -ef, for examples I ran yes from one shell, and another yes from another yes, when I do ps -ef |grep [y]es I can see two copies with the same name and of course with different PID.
How can I name the first yes “one” and the second name “two” in shell?
How can I run the same program two times or more with different names
Share
If you have different parameters/arguments, and you want to be able to grep for them in your process list, then you want to use the -w flag. The ps(1) manual says:
With that in mind,
ps -efwworps axwwwill give you the entire command line for each process, making it easy to differentiate.