Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I run a ps command inside a startup script, if I put in:

ps -A -o euser,pid...

I get this output:

EUSER      PID CMD                         %CPU   RSS    SZ     ELAPSED 
root       644 ./code                       0.0   996  2963       00:00

It's there each time.

If I run:

ps -C ./code -o euser....

it does not display anything at all.

Any suggestions?

share|improve this question
    
Did you literally type “ps -A -o euser,pid...” and “ps -C ./code -o euser....”? I don't know of any system that accepts ... or .... here: what operating system are you using? If you actually typed something else and not the dots: copy-paste what you typed, exactly. It may be relevant. And do tell us which unix variant you're running. –  Gilles Sep 9 '12 at 21:40

1 Answer 1

up vote 0 down vote accepted

Try the ps -C with just the bare script name (i.e. without ./). e.g.

ps -C code -o euser....

share|improve this answer
    
Thank you very much that did it :) –  Peppercat101 Sep 10 '12 at 8:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.