Small Mosaic


Categories:

/books
/career
/codinghorrors
/events
/geekstuff
/justdont
/languages
/languages/bash
/linkshot
/magazines
/meta
/misctech
/movies
/nottech
/operatingsystems
/operatingsystems/linux
/operatingsystems/linux/debian
/operatingsystems/solaris
/perl
/presentations
/programming
/python
/ruby
/security
/security/apache
/security/tools
/serversmells
/services
/services/dns
/sites
/specifications
/sysadmin
/testing
/tools
/tools/commandline
/tools/firefox
/tools/gui
/tools/network
/tools/online
/tools/online/greasemonkey
/tools/puppet
/unixdaemon

Archives:

July 20111
June 20112
May 20113
April 20112
March 20117
January 20111
December 20103
November 20103
August 20101
July 20101
June 20104
May 20102
April 20101
March 20108
February 20101
January 20102
Full Archives

Wed, 29 Sep 2004

/etc/release -- Consistency, never heard of it!
If you are working on a modern Unix machine (no, thats not an oxymoron) then it's annoying difficult to determine the operating system name and version running. Where you should just be able to type '/etc/release' and get the relevant details you instead need to either guess or brute-force your way through the possibilities. Debian stores this info in '/etc/debian_version', Redhat in '/etc/redhat_release'. You know the world is going to end when Solaris makes the most sense and puts this information in '/etc/release'. Why is this better? Because it doesn't assume my scripts know where they are running, they can determine that from the contents of the file itself!

A warning to one and all, this is going to become my new crusade ;)

Like this post? - Digg Me! | Add to del.icio.us! | reddit this!

Posted: 2004/09/29 18:30 | /operatingsystems/linux | Permanent link to this entry | This entry and same date


books career codinghorrors events geekstuff justdont magazines meta misctech movies nottech operatingsystems/linux operatingsystems/linux/debian operatingsystems/solaris perl programming python ruby security security/apache security/tools serversmells services/dns sites sysadmin testing tools tools/commandline tools/firefox tools/gui tools/network tools/online tools/online/greasemonkey tools/puppet unixdaemon

Copyright © 2000-2010 Dean Wilson XML feed logo