spacer
Web Development Tutorials LINUX Tutorials
 Developer Newsletter

Tutorials
AJAX
ASP
CGI & Perl
CSS
Flash
HTML
Illustrator
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML
Miscellaneous


Scripts Directory
AJAX Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Web Hosting Directory
ASP.NET
Budget
Dedicated Servers
Ecommerce
Linux
Resellers
Shared
Small Business
Windows

Developer Manuals
Learn HTML
Learn PHP
Learn CSS
Learn AJAX
Learn JavaScript
Learn Pear
Free White Papers

Developer Resources
Developer Tools
Developer Content
Survey Software
Dedicated Servers




ps sorting

By Tony Lawrence
2005-09-02


ps sorting

In the beginning, when large creatures lumbered through damp tropical forests and furry mammals hid quivering in their burrows, "ps" had no built in abilty to change its sort order. You got what it gave, and if you wanted it otherwise, you ran it through "sort" yourself. That is the Unix Way: small tools, working together with pipelines.

BSD mucked with that a bit, adding a "-m" option that sorted by memory usage, instead of by process ID. As that's a pretty common desire, I doubt anyone saw that as an offense to the Unix gods, though really it was. But it was convenient, wasn't it?

But now Linux ps adds something much more nasty. Not only does Linux ps have a built-in "--sort" option (added by Charles Blake, so says the man page), it also overloads "-O" which originally was used for user defined formats (specifying the fields you want to see) to do the same thing. Sacrilege! The sanctity of the Unix Way is violated by this insertion. Do you see what happens when you let the camel poke his nose in the tent? That little "-m" was so convenient, and now look at this mess! Pretty soon ps will be drawing graphs and outputting html!

I'm only half kidding. Linux ps with --sort can be convenient, but it is also feature bloat and I'm not entirely happy to see that. Too much camel in the tent, I think.



Tutorial Pages:
» ps sorting


© Copyright 2005 A.P. Lawrence


 | Bookmark Print |   Write For Us
Related Tutorials:
» How to Install PHP 5 on Linux
» How to Install Apache 2 on Linux
» How to Install MySQL 5.0 on Linux
» SMB Caching
» Mound --Bind
» Tar Wild Card Interpretation



About the NetVisits, Inc Network | Write For Us | Advertise
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: