Unable to display directory info with ps command

Hello,

I start an adapter using the following command -

nohup ./start_embargoAdapter >/dev/null 2>&1 &

and when I do the following, I can see:

[xxxxx@abcd1254] /export/home/xxxxx> ps -ef | grep embargo
   xxxxx 28086 20761 0 23:23:29 pts/7 0:00 grep embargo
   xxxxx 8866 1 0 Oct 06 ? 0:00 /bin/ksh ./start_embargoAdapter

But I would like to see the ps output with the directory of the file, something like this:

/opt/WebSphere/dir1/dir2/start_embargoAdapter

Can anyone tell me how to do that? I am sure I need to modify nohup command to get this result. Please guide me.

Try:

nohup $PWD/start_embargoAdapter >/dev/null 2>&1 &

That should expand the current working directory on the command line and be captured for ps to display.

1 Like

Thank you very much Agama! it worked! :slight_smile: