Archive for June 2008

One-liner: Converting a Text File to Unicode on the Command Line

Posted by: JDS

Here it is, a one-liner. Gotten from this very ugly website: http://www.kriyayoga.com/love_blog/post.php/224
iconv --from-code=ISO-8859-1 --to-code=UTF-8 ./oldfile.htm > ./newfile.html

One Liner: dynamically enabling and disabling one's second CPU

Posted by: JDS

Linux SMP kernel lets you turn off the second CPU if you want.
jeff@frogpad:~$ ls -l  /sys/devices/system/cpu
total 0
drwxr-xr-x 6 root root    0 2008-06-11 08:01 cpu0
drwxr-xr-x 3 root root    0 2008-06-11 09:00 cpu1
drwxr-xr-x 2 root root    0 2008-06-11 09:00 cpuidle
-rw-r--r-- 1 root root 4096 2008-06-09 11:27 sched_mc_power_savings
jeff@frogpad:~$ cat  /sys/devices/system/cpu/cpu1/online 
0
jeff@frogpad:~$ sudo echo 1 > /sys/devices/system/cpu/cpu1/online 
bash: /sys/devices/system/cpu/cpu1/online: Permission denied
jeff@frogpad:~$ sudo sux -
root@frogpad:~# echo 1 > /sys/devices/system/cpu/cpu1/online
root@frogpad:~# 

So, it looks like you have to actually be logged in (or su'ed in) as root for this to work -- sudo doesn't cut it. Don't know why. Also note that I use 'sux' instead of 'su'.

Linux is Better Than Windows

Posted by: JDS

Alright, so, I'm a little biased, yes. But I just hate seeing articles that are plainly wrong or misleading. And there are a lot of them.

So, I posted this long rant to some guy's website about why Linux is better than Windows and how he was wrong wrong wrong. I thought I would save it here, and tweak it into an article.

http://coconuter.blogspot.com/2008/04/windows-vs-linux-comparison-and-review.html

Anyway, he presented a couple of common misconceptions about Linux. I think the most common one is that whole command-line thing. Here are my comments posted to his site:

Howdy. Linux is not harder to use than Windows, it is just DIFFERENT to use than Windows, and to some people that equates to harder. Linux is easier to use for people who have never used a computer before than it is for long time Windows users, because of the difference. Also, there are some common misconceptions in your article that I would like to dispell:

1) Linux is not harder to use than Windows, just different to use (covered that already)

2) You NEVER EVER EVER need to use the command line with Linux. NEVER. This is a leftover impression from old Linux days when this was true. It is, simply put, false and misleading. You do, however, have the option of using the CLI, if you want.

3) Linux has better out-of-the box driver/hardware support than Windows. Ever try connecting to a wired network after just installing WinXP? Can't do it. Need to insert driver disk. Not on Linux, though, your NIC will be up and running immediately. And that is just one example.

4) With all of the available free software for everyday tasks, and nearly impervious to malware, Linux is much better than Windows for the average user.

Linux is NOT good for a lot of people, though! Gamers, people with specifc software needs like niche market software or other Windows-only apps are better off using Windows.

"Grandma" though, and average users like her, using office apps, email, and web, primarily, are BETTER off using Linux.

Okay, seeya! Bye!

Okay, so, yeah, sticking in a paragraph that makes it look like I am not biased -- the Windows is good for some people paragraph -- is maybe a little obvious bias-cover-up. But whatchagonnado? When one finds something that one loves, one wants to tell the world, doesn't one? But really, the part that irks me the most about Windows users' comparisons of Linux is the generally outdated and incorrect comparisons.

I will admit, Linux can be a bit confusing. The vast number of choices is really quite overwhelming. So from here on out, I'll try to stick to comparison by using a particular distro vs Windows, and not "Linux" which really covers a lot more territory and at the same time is a lot more granularly specific than the term "Windows".

So for future posts, it is going to be LinuxMint vs Windows. I was going to go with Ubuntu, but as far as comparisons of interest to "averege" users go, LinuxMint levels the playing field even more than Ubuntu, with its out-of-the-box software choices.