In a bash shell using ps, is it possible to return just process names + PIDs without their paths? For example, using ps -A I get something like this:
Octo:~ decavolt$ ps -A
PID TTY TIME CMD
1 ?? 12:29.17 /sbin/launchd
10 ?? 0:01.37 /usr/libexec/kextd
11 ?? 7:03.37 /usr/sbin/DirectoryService
12 ?? 18:16.71 /usr/sbin/notifyd
...
What I'd like to see is more like:
PID TTY TIME CMD
1 ?? 12:29.17 launchd
10 ?? 0:01.37 kextd
11 ?? 7:03.37 DirectoryService
12 ?? 18:16.71 notifyd
...
EDIT: Sorry, I should have clarified that this is on OSX 10.5 and 10.6