/bin/ps shell command broken

I'm running 10.6.3 and recently noticed the /bin/ps command is broken.

$ ps -ef
ps: illegal option -- f
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
[-u]
[-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
ps [-L]

How do you log an issue with Apple?

MacBook Pro, Mac OS X (10.6.3)

Posted on Jun 4, 2010 5:37 AM

Reply
2 replies

Jun 4, 2010 7:44 AM in response to kfrodgers

Yes this discussion should be held in the Mac OS X Technologies Unix forum

As a point of information, /bin/ps -ef also gives me an illegal -f option.

HOWEVER, if I become root, it works

sudo /bin/ps -ef
UID PID PPID C STIME TTY TIME CMD
0 1 0 0 19:58.45 ?? 20:07.86 /sbin/launchd
0 10 1 0 0:03.90 ?? 0:21.57 /usr/libexec/kextd
0 11 1 0 0:24.04 ?? 0:43.67 /usr/sbin/DirectoryService
...
...

it works nicely.

Update. The above was run from iTerm session. When I started an Applications -> Utilities -> Terminal session, the /bin/ps -ef WORKED!

Very strange. I wonder what environmental conditions are affecting the ps option parsing. I find it very hard to beleive that it is the actual terminal emulator.

Take this discussion over to Mac OS X Technologies -> Unix forum, and let the other interested Unix users have a go at figuring this out.

Message was edited by: BobHarris

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

/bin/ps shell command broken

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.