Unix Hosting News & Commentary

Today I needed to report a bug on a piece of software that ran on a linux system. The bug report form asked for a version of the system I was running. On traditional unix system (By these I mean Solaris, HP-UX, Aix), I would run uname -a and the third or fourth argument would be the os name and version. Done I could report my OS version number. I could always run a few other command that would be specific to learn a bit more about the version - but uname -a would give me the information straight away.
so on my Ubuntu system it gave me :

ludo@toto:~$ uname -a
Linux toto 2.6.22-14-server #1 SMP Tue Dec 18 05:52:24 UTC 2007 x86_64 GNU/Linux

Which did not help a lot. After poking a bit I found the following, each distribution as a file in /etc which gives this information :

etc/redhat-release
etc/SuSE-release
etc/gentoo-release
etc/yellowdog-release
etc/mandrake-release
etc/whitebox-release
etc/debian_version

As Ubuntu is a debian derivative it uses the etc/debian_version file - but this might not be enough, the real nice command to run is lsb_release. On OpenSuse this gives :

toto0:~ # lsb_release -a
LSB Version: />Distributor ID: SUSE LINUX
Description: openSUSE 10.3 (X86-64)
Release: 10.3
Codename: n/a

and on Ubuntu it gives :

ludo@toto:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 7.10
Release: 7.10
Codename: gutsy

As one can see the lsb_release command is the command to figure out which version of linux and which distribution your system is running.
To be complete on AIX the command that gives you more information is oslevel. On Mac OS X it’s sw_vers. I currently can’t recall what it is for sun, nor for HP-UX.

A friend of mine wrote regarding OS X:

I’ve forgotten what weird permission thing I ran into one time… chmod and chattr didn’t affect the permissions. There was some other ch-thing that I hadn’t encountered before or since.

It stores an enormous amount of meta-data in the files, too, with the ability to set key-value pairs for files that you can query via the search tool. Linux has a similar little used chattr command with rarely used parameters:

The letters ‘acdijsuADST’ select the new attributes for
the files: append only (a), compressed (c), no dump (d),
immutable (i), data jour- nalling (j), secure deletion (s),
no tail-merging (t), undeletable (u), no atime updates (A),
synchronous directory updates (D), synchronous updates (S),
and top of directory hierarchy (T).

I think I’ve used the append only and immutable options for security reasons, but that is about it. The no-atime updates is nice for embedded systems, but it is more useful to set on the entire FS than individual files.

One other uncanny valley interface is that files aren’t case-sensitive on OS X’s HFS drives and store the last case with which they were opened. This caused some weird bugs when I created gps.h, then by accident did a ‘touch GPS.h’. The file was “renamed” and would correctly be included by ‘#include ‘ since gcc would open the case insensitive file name, but Make lost track of it since it assumed the file system was case sensitive. Somethings were able to rebuild, but other parts of my library died during the build.

Continuing, my friend wrote:

That, and finding files that would appear to be the right thing to change, only to find that Mac has the “real” information squirreled away somewhere else, and that the file I edited appears to be either a decoy or a placebo.

My vote is decoys. The whole fact that /etc isn’t really the system-wide etc makes me wonder how many things are out there to try to trick savvy Unix users…

Joel (you know, that “Joel”) has an article on user interface annoyances and how they add up over time to really slow down users. I can totally sympathize with this portrait of a frustrated computer user:

Pete has also learned to use Alt+F4 to close windows. On the Mac,
this actually changes the volume. At one point, Pete wanted to click
on the Internet Explorer icon on the desktop, which was partially
covered by another window. So he hit Alt+F4 to close the window
and immediately double-clicked where the icon would have been. The
Alt+F4 raised the volume on the computer and didn’t close the window,
so his double click actually hit the Help button in the toolbar on
the window which he wanted closed anyway, which immediately started
bringing up a help window, so now, he’s got two windows open which
he has to close.

Another small frustration. But, boy, does it add up. At the end
of the day, Pete is grumpy and angry. When he tries to control
things, they don’t respond. The space bar and the Alt+F4 key
“don’t work” — for all intents and purposes, it’s as if those
keys were broken. The window disobeys him when he tries to make it
wider, playing a little prank where it just moves over instead of
widening. Bad window. Even if the whole thing is subconscious, the
subtle feeling of being out of control translates into helplessness,
which translates into unhappiness.

I’m really particular about my computing environment (as a search in the archives will show I love my 16 year old Model-M keyboard, my vintage 1992 window manager and the eon-old vi) and feel somewhat hobbled when I end up on someone else’s machine. Hopefully with great customizability also comes great productivity.

(How many articles does Joel plan to write? At one per-second he is set for the next 317 years before he fills up that number space!)

Filed under: iPod Family, UNIX / BSD, iPhone

After typing his fingers to the bone, overworked iPhone developer Jay “Saurik” Freeman has finally finished his long-awaited Cydia release. As Freeman puts it, the iPhone is a 667MHz computer with 128MB RAM and at least 4GB of flash. So why not use it as a Unix workstation?

Motivated by the relative limitations of the existing BSD subsystem, Freeman decided to port Debian’s APT to the iPhone — tweaking items to work better with the iPhone’s relatively messed-up network settings. A UIKit front end, Cydia, provides a GUI for users to select and install programs — basically Installer.app for fully leaded geeks. Cydia isn’t limited to command-line software. It should allow installation of any and all software package types.

Read | Permalink | Email this | Comments



Categories

Site Directory

Top Web Hosts

1.  
2.  
3.  
4.  
5.  
6.  
7.  
8.  
9.  
10.  
-   

Favorites

Powered by Technorati