ps -eo comm

lolaferrari
lolaferrari used Ask the Experts™
on
If i run ps -eo comm it lists the process but not the full path of the daemon running. If i run ps -ef | awk '{print $8}' it will print the whole path of the process running but if i put ps -ef | awk '{print $8}' in a script it doesn't print the 8th field. Very strange. Any ideas on redhat how to get just the process with the full path in a script?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
ps -ef -o pid,cmd

Open in new window


Is that what you need? If not, man ps, and find the STANDARD FORMAT SPECIFIERS
section to choose columns.

Or maybe
ps -x -o pid,cmd

Open in new window

Most Valuable Expert 2013
Top Expert 2013
Commented:
ps -eo args

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial