While going through the source code for the well known ps command, I read about some interesting things.. Namely, that there are a bunch of different fields that ps can try and enumerate for you. These are fields I was not able to find in the man pages, documentation, only in the source.
Here is a longer function that goes through each of the formats recognized by the ps on your machine, executes it, and then prompts you whether you would like to add it or not. Adding it simply adds it to an array that is then printed when you ctrl-c or at the end of the function run. This lets you save your favorite ones and then see the command to put in your .bash_profile like mine at : http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html
Note that I had to do the exec method below in order to pause with read.
* View this command to comment, vote or add to favourites * View all commands by AskApache
by David Winterbottom (codeinthehole.com)
- 2010/11/13 Firesheep addon allows the clueless to hack Facebook, Twitter over Wi-Fi
- 2010/11/07 Skyline with Red color – from mobile.
- 2010/10/02 [Solved] Abbreviations not working in vim
- 2010/09/30 Free Calendar for October 2010
- 2010/06/25 Twiiter from Pidgin on Fedora 11 -Leonidas