On Ubuntu and Free Software
I've tried Ubuntu off and on since they first released. It's what I've recommended to friends as a first Linux distro and I'm writing this on a (borrowed) laptop running Ubuntu.
But for my own systems, I run Debian. One of the reasons I've stuck with Debian is I've found the project is most consistent with what I think free software should be and what it doesn't have to be. I'm ok waiting an extra six months (or 18 months) for a feature to be implemented in a free, unencumbered way. I'm ok not using features which require me to surrender rights or privileges to someone else. Until the last year or so, I thought Ubuntu shared that belief.
Benjamin Mako Hill wrote an
essay for the
Free Software Foundation about the arguments for "free software" versus "open source", where the latter argues that it is better because of the quality of code. For me, free software is better because it's free, not because of features or quality.
On quality and features, Ubuntu often makes a better desktop. On being free, Canonical keeps moving itself farther and farther away, as Novell and (especially) RedHat have done. Releasing code under GPL isn't enough.
I get why people use Ubuntu. For a long time, I've tried to like it - but too many problems, too many conflicts. And now, Canonical is trying to redefine what "free" means.
I get it. I get why people run OSX. Or Windows. I get why people choose lots of things I wouldn't. Sure, opinions vary. But I think people have to reconsider why they're running GNU/Linux, and if Ubuntu still meets those standards.
Labels: benjamin mako hill, canonical, debian, free software, free software foundation, linux, open source, ubuntu
Daylight Savings Time and Scheduling Jobs
Twice a year, we move our clocks around and either "gain" or "lose" an hour. This "Daylight Savings" can cause issues with scheduled jobs because an hour is either missed or repeated.
In the U.S.A., we "spring forward" on the second Sunday in March and skip the 0200 hour; our clocks go from 0159 to 0300 and any jobs we had scheduled between that time DO NOT HAPPEN.
Can I emphasize that again? If you scheduled something for 2AM, like your backups, it DOES NOT HAPPEN.
Then, we "fall back" on the first Sunday in November and repeat the 0100 hour; our clocks go from 0159 to 0100 and any jobs we had scheduled between that time HAPPEN TWICE.
This just sucks all around, doesn't it?
What's an admin to do about it? Well, you can avoid scheduling jobs from 0100 to 0300, you can schedule the jobs and move jobs as needed when Daylight Savings Time approaches or you can avoid the problem entirely by running your systems on UTC.
As soon as I get a job where I can run all of my systems in UTC, I'll let you know.
Daylight Savings sucks.
Labels: daylight savings, linux, system administration, time
Rotating log files without parsing ls
When people are rotating custom log files, they often parse
ls because, well, because they don't know any better.
Now you will and you can smack them appropriately.
If you have a bunch of log files with sequential file names (like dates), then you can easily trim to a specific number of files to keep.
$ echo mylog.*.gz
mylog.20100126.gz
mylog.20100125.gz
mylog.20100124.gz
mylog.20100123.gz
mylog.20100122.gz
mylog.20100121.gz
mylog.20100120.gz
mylog.20100119.gz
$ numsave=5
$ echo mylog.*.gz | tr " " "\012" | sort -nr | while read f
> do
> if [ ${numsave} -gt "0" ] ; then
> numsave=$((numsave - 1))
> else
> echo DELETE $f
> fi
> done
DELETE mylog.20100121.gz
DELETE mylog.20100120.gz
DELETE mylog.20100119.gz
And you can easily substitute an "rm" where I put "echo DELETE".
But what if you named the files like a moron such that you can't sort by name. Like, "26Jan2010", that kind of moron.
$ echo mylog.*.gz
mylog.26Jan2010.gz
mylog.25Jan2010.gz
mylog.24Jan2010.gz
mylog.23Jan2010.gz
mylog.22Jan2010.gz
mylog.21Jan2010.gz
mylog.20Jan2010.gz
mylog.19Jan2010.gz
$ numsave=5
$ ls -t1 mylog.*.gz | while read f
> do
> if [ ${numsave} -gt "0" ] ; then
> numsave=$((numsave - 1))
> else
> echo DELETE $f
> fi
> done
DELETE mylog.21Jan2010.gz
DELETE mylog.20Jan2010.gz
DELETE mylog.19Jan2010.gz
Labels: linux, shell scripting, system administration, unix
One Liner: Install all fonts with aptitude
Install all fonts (packages starting with "ttf-" or "xfonts-") :
# aptitude install '?narrow(?name("^(ttf-|xfonts-)"), ?not(?installed))'
Labels: aptitude, debian, fonts, linux, one liner
Lifehacker isn't hacking enough.
Lifehacker ran a list of "
Readers' Free Replacements for Paid Tools" which I would care about if I ever paid for software tools. More than seven years ago, I switched to Linux exclusively and the only software I buy is the
rare game (and I don't use unlicensed copies at all).
"Companies that suffered from piracy a decade ago now know the lesson well - piracy is a good thing so long as the pirates are folks who could never afford your products. So stop calling them pirates, call hem users. Free software has no pirates."
--Jonathan Schwartz, Free Software Has No Pirates
I know that it's hard for some people to understand but Free Software means I don't have to worry about getting audited for license violations or calling up the company because software I
paid for won't work after I upgraded computers.
All of starts by not running an operating system that tells me what I'm allowed to do with it. Or a phone or a DVD player or a television or anything. If I buy something and what I want to do is legal, I shouldn't be restricted by a license.
Labels: free software, law, lifehacker, linux, open source, windows
OSX has bugs. Get used to it.
Many years ago, I cut my teeth on Solaris; a year later, I started using Linux because it was free and ran on a 386 I picked up. It always amazed me how Linux fanboys heard I started on Solaris and then would presume I was anti-Linux in some fashion, dedicated solely to the use of Solaris, and they would lecture me at length about Solaris's failures and Linux's successes. Then I would run into hardcore Solaris admins who learned I ran Linux and would presume I was a F/OSS zealot that refused to use proprietary software and they would lecture me at length about Linux's failures and Solaris's successes.
Most ironically, a community once called me a troll when I disputed some fanboy's assertion about the supremacy of Linux. This, considering he was a self-declared hobbyist user and I was a sysadmin with longer professional experience than his hobbying.
Three days ago, I
pointed out that Mac OSX, despite all claims to the contrary, was vulnerable to exploits just as Windows and *nix. The latest is
a root privilege escalation. My point was and still is that no system is perfect and the more complex a system is, the more errors which will result. As OSX has become more popular, it has become more of a target and people are spending more time finding errors
that were already there. Trying to gloss over the errors or pretend they're less important than so-and-so's failure does a disservice to everyone.
Don't bullshit yourself or me. Especially me. OSX has bugs. Get used to it. We're going to see lots more bugs revealed as people spend more time hacking on it. If you can't cope with that idea, kill yourself now.
Labels: apple, bugs, fanboys, linux, mac, osx, solaris, windows