<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Unix on Blogarious</title>
    <link>https://blogarious.kairopath.net/categories/unix/</link>
    <description>Recent content in Unix on Blogarious</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 15 Oct 2010 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blogarious.kairopath.net/categories/unix/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>sed, awk (gawk), and Perl</title>
      <link>https://blogarious.kairopath.net/posts/2010-10-15-sed-awk-gawk-and-perl/</link>
      <pubDate>Fri, 15 Oct 2010 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2010-10-15-sed-awk-gawk-and-perl/</guid>
      <description>&lt;p&gt;As a programmer, I like the Unix commands &amp;ldquo;find&amp;rdquo; and &amp;ldquo;grep&amp;rdquo;. They are too good. &amp;ldquo;find&amp;rdquo; to find the files recursively based on file name, file type, etc, then execute command towards the files.&lt;/p&gt;&#xA;&lt;p&gt;&amp;ldquo;grep&amp;rdquo; is even more better, when I want to find some words in the source code, and I can use regular expression. Combine &amp;ldquo;grep&amp;rdquo; with &amp;ldquo;sed&amp;rdquo;, one can perform search and replace.&lt;/p&gt;&#xA;&lt;p&gt;However, when I want to search and replace for multiple patterns, &amp;ldquo;sed&amp;rdquo; will be difficult to be used. One can write a shell script to perform the task. But &amp;ldquo;awk&amp;rdquo; (or GNU awk) will be a better solution for me. Write an awk script, can search and replace easier, and awk script allows to use variables.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Chromium is really good in netbook</title>
      <link>https://blogarious.kairopath.net/posts/2010-09-18-chromium-is-really-good-in-netbook/</link>
      <pubDate>Sat, 18 Sep 2010 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2010-09-18-chromium-is-really-good-in-netbook/</guid>
      <description>&lt;p&gt;Compare to the Firefox, I prefer to run Chromium in my netbook. This is because the screen of the netbook is small, and the resolution is low. Using Firefox, the toolbars and file menu already occupies half of the screen. I think Firefox 4.0 will solve my problem.&lt;/p&gt;&#xA;&lt;p&gt;Then, using Firefox on the netbook with Ubuntu, playing Castle Age will make Firefox slow down. May be the reason is the netbook memory is smaller than normal laptop.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Huawei E1552 on Ubuntu</title>
      <link>https://blogarious.kairopath.net/posts/2010-08-20-huawei-e1552-on-ubuntu/</link>
      <pubDate>Fri, 20 Aug 2010 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2010-08-20-huawei-e1552-on-ubuntu/</guid>
      <description>&lt;p&gt;I was using Huawei E220, a very old USB Modem. Yet, running on Ubuntu does not have any problem.&lt;/p&gt;&#xA;&lt;p&gt;Then I tried the new Huawei E1552 on Windows. Nicer interface. Newer is better. But when I tried it on Ubuntu, yes, Huawei Mobile Partner icon is on the desktop. Can open it. But I cannot connect to internet.&lt;/p&gt;&#xA;&lt;p&gt;So, in order to solve this problem, I tried to search from Internet. Right, I need &lt;a href=&#34;http://www.draisberghof.de/usb_modeswitch/&#34;&gt;USB_ModeSwitch&lt;/a&gt; to solve this problem. Reading the page, you will find a lot of steps need to follow.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Regular expression, find and replace using Unix tools</title>
      <link>https://blogarious.kairopath.net/posts/2010-06-20-regular-expression-find-and-replace-using-unix-tools/</link>
      <pubDate>Sun, 20 Jun 2010 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2010-06-20-regular-expression-find-and-replace-using-unix-tools/</guid>
      <description>&lt;p&gt;I need to add some text to a lot of text files. Previously, I used &lt;a href=&#34;http://www.jedit.org/&#34;&gt;jEdit&lt;/a&gt; to perform regular expression for several files. But currently, I need to add the text for about 120 files. In order to do this, I tried using Unix tools, &amp;ldquo;sed&amp;rdquo;, &amp;ldquo;grep&amp;rdquo;, and &amp;ldquo;xargs&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;Firstly, I tried MSYS, yet it fails. Because the &amp;ldquo;sed&amp;rdquo; version was too old. Then, I used Cygwin.&lt;/p&gt;&#xA;&lt;p&gt;My problem was to add the following text to the text files:&lt;/p&gt;</description>
    </item>
    <item>
      <title>MinGW and Cygwin</title>
      <link>https://blogarious.kairopath.net/posts/2010-02-06-mingw-and-cygwin/</link>
      <pubDate>Sat, 06 Feb 2010 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2010-02-06-mingw-and-cygwin/</guid>
      <description>&lt;p&gt;I am a software developer. I like cross-platform development. And I prefer lower level programming language like C. My OS is Windows. Thus, I normally use &lt;a href=&#34;http://www.microsoft.com/exPress/&#34;&gt;Visual Studio Express Edition&lt;/a&gt; to compile the source code. But using Microsoft Visual C++ compiler is not a good idea for cross-platform development, because it highly depending on the Microsoft platform. Besides that, it doesn&amp;rsquo;t have C99 standard.&lt;/p&gt;&#xA;&lt;p&gt;So, the best cross-platform C and C++ compiler is &lt;a href=&#34;http://gcc.gnu.org/&#34;&gt;GCC&lt;/a&gt; (GNU Compiler Collection). However, it is used in Unix-like OS. Yet, there are two projects porting GCC to Windows: &lt;a href=&#34;http://www.mingw.org/&#34;&gt;MinGW&lt;/a&gt; and &lt;a href=&#34;http://www.cygwin.com/&#34;&gt;Cygwin&lt;/a&gt;. These two projects provide us GCC to compile cross-platform source code such as libjpeg, libpng, zlib, etc. This indicates that, we can also write our own cross-platform source code and compiled by using GCC in Windows and other Unix-like OSes.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Success booting PC-BSD through USB flash drive</title>
      <link>https://blogarious.kairopath.net/posts/2010-01-29-success-booting-pc-bsd-through-usb-flash-drive/</link>
      <pubDate>Fri, 29 Jan 2010 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2010-01-29-success-booting-pc-bsd-through-usb-flash-drive/</guid>
      <description>&lt;p&gt;Hahaha. When I wrote my previous post, I found that I possibly made a mistake when copying the IMG image to USB pendrive. Yes, I used &amp;ldquo;dd&amp;rdquo; incorrectly because I didn&amp;rsquo;t know how to use it exactly.&lt;/p&gt;&#xA;&lt;p&gt;This was how I used &amp;ldquo;dd&amp;rdquo; in Linux:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;dd if=PC-BSD-7.1.1-x86.img of=/dev/sdb1 bs=1024&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now, the problem was the &amp;ldquo;/dev/sdb1&amp;rdquo;. We should use &amp;ldquo;/dev/sdb&amp;rdquo; instead of &amp;ldquo;/dev/sdb1&amp;rdquo;. This is because &amp;ldquo;sdb1&amp;rdquo; indicates the partition, yet &amp;ldquo;sdb&amp;rdquo; indicates the drive. And I should copy (dd) the whole file system and data of IMG to the drive, not to the partition. That was why, after I used the statement above, I still found that my pendrive was in FAT32 format.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Difficulties for installing PC-BSD</title>
      <link>https://blogarious.kairopath.net/posts/2010-01-28-difficulties-for-installing-pc-bsd/</link>
      <pubDate>Thu, 28 Jan 2010 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2010-01-28-difficulties-for-installing-pc-bsd/</guid>
      <description>&lt;p&gt;I like Unix philosophy. I like open source. I want to install PC-BSD to my netbook, but finally I realised that I failed to do so. I have tried several ways, then I give up now.&lt;/p&gt;&#xA;&lt;p&gt;Actually, I preferred to install FreeBSD. But FreeBSD is targeted for server, so I choose PC-BSD. And PC-BSD has GUI installation, which makes everything easier (I tried it on VMware). So, I downloaded DVD ISO image. Then, I tried to use &lt;a href=&#34;http://unetbootin.sourceforge.net/&#34;&gt;UNetbootin&lt;/a&gt;, since the site mentioned that it supports to create LiveUSB for FreeBSD 6.3 and 7.0. I assumed that it can also support for PC-BSD which is based on FreeBSD. However, I failed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>gparted from Parted Magic</title>
      <link>https://blogarious.kairopath.net/posts/2010-01-25-gparted-from-parted-magic/</link>
      <pubDate>Mon, 25 Jan 2010 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2010-01-25-gparted-from-parted-magic/</guid>
      <description>&lt;p&gt;The story continues from my previous post.&lt;/p&gt;&#xA;&lt;p&gt;I used Parted Magic to perform the partition tasks. However, I found that &lt;strong&gt;Kingston DataTraveler 2.0 USB Device&lt;/strong&gt; cannot boot as LiveUSB. It cannot find &lt;strong&gt;pmagic-4.5.sqfs&lt;/strong&gt;. And even Parted Magic 4.8, there is something like &lt;strong&gt;dev_list&lt;/strong&gt; cannot be found. But, there is no problem for &lt;strong&gt;Kingston DT 101 II USB Device&lt;/strong&gt;. Weird!&lt;/p&gt;&#xA;&lt;p&gt;Okay, after I delete E: F: and resize D: to occupy the space. But in Windows, I found that the D: properties show that the space is still the same. But in &lt;strong&gt;Disk Management&lt;/strong&gt; utility, the space is already used for D:. I tried CHKDSK, the problem still there. Then I remember a phrase from a movie:&lt;/p&gt;</description>
    </item>
    <item>
      <title>GRUB problem</title>
      <link>https://blogarious.kairopath.net/posts/2010-01-24-grub-problem/</link>
      <pubDate>Sun, 24 Jan 2010 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2010-01-24-grub-problem/</guid>
      <description>&lt;p&gt;Playing around my HP Mini Netbook with different OSes really troublesome.&lt;/p&gt;&#xA;&lt;p&gt;Today, I am trying to install &lt;a href=&#34;http://www.pcbsd.org/&#34;&gt;PC-BSD&lt;/a&gt; on my netbook. But before I install PC-BSD, I need to make some space for it. And according what I read,&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Be aware that BSD operating systems, and hence PC-BSD, only recognise primary partitions and consider any logical partitions as a whole primary partition. Trying to install on a logical partition will convert your extended partition into a primary partition and erase all logical partitions of your system. PC-BSD can be installed on any primary partition; it doesn&amp;rsquo;t necessarily have to be on the first one. [PC-BSD guide]&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ubuntu Netbook Remix USB detection</title>
      <link>https://blogarious.kairopath.net/posts/2009-12-27-ubuntu-netbook-remix-usb-detection/</link>
      <pubDate>Sun, 27 Dec 2009 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2009-12-27-ubuntu-netbook-remix-usb-detection/</guid>
      <description>&lt;p&gt;As a newbie to Linux, using Ubuntu Netbook Remix gave me some trouble. Because I found that, when I plug in the USB pendrive, there is no response. So I cannot mount it manually, and there is no information in /dev drive.&lt;/p&gt;&#xA;&lt;p&gt;Search for a long time for the solution, study a lot, read the forum. I found some solution like &amp;ldquo;udev&amp;rdquo;. However, I already installed udev, but there is no detection found. Finally I join Ubuntu IRC to ask for information, but there is no solution yet.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ubuntu Netbook Remix HP Mini 1109TU Wireless network driver</title>
      <link>https://blogarious.kairopath.net/posts/2009-12-16-ubuntu-netbook-remix-hp-mini-1109tu-wireless-network-driver/</link>
      <pubDate>Wed, 16 Dec 2009 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2009-12-16-ubuntu-netbook-remix-hp-mini-1109tu-wireless-network-driver/</guid>
      <description>&lt;p&gt;The problem I faced on UNR on HP Mini 1109TU is the Wireless Network driver. The Wireless device of HP Mini 1109TU is Broadcom Corporation BCM4312 802.11b/g.&lt;/p&gt;&#xA;&lt;p&gt;After the installation of UNR Karmic (9.10), there is no Wireless Network support. I cannot access internet with WiFi. So, the network cable is needed for internet connection.&lt;/p&gt;&#xA;&lt;p&gt;I have tried several ways to enable the Wireless Network driver. First, run the System &amp;gt; Administration &amp;gt; Update Manager to update everything (remember to find the fastest repositories). After everything is updated, reboot Ubuntu.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ubuntu Netbook Remix part 2</title>
      <link>https://blogarious.kairopath.net/posts/2009-12-16-ubuntu-netbook-remix-part-2/</link>
      <pubDate>Wed, 16 Dec 2009 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2009-12-16-ubuntu-netbook-remix-part-2/</guid>
      <description>&lt;p&gt;After a long time, I successfully setup the Ubuntu Netbook Remix to access the Wireless Network Connection (WiFi). Next post I will share about what I have experienced. The following is the screenshot of UNR:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;images/unr.png&#34;&gt;&lt;img src=&#34;images/unr.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I haven&amp;rsquo;t tried Windows 7. But I am satisfied with Windows XP. And now I got Ubuntu, and experience a new different OS. Good feeling! Feeling good!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;images/lg-share-en.gif&#34; alt=&#34;Bookmark and Share&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Trying Ubuntu Netbook Remix</title>
      <link>https://blogarious.kairopath.net/posts/2009-12-15-trying-ubuntu-netbook-remix/</link>
      <pubDate>Tue, 15 Dec 2009 00:00:00 +0000</pubDate>
      <guid>https://blogarious.kairopath.net/posts/2009-12-15-trying-ubuntu-netbook-remix/</guid>
      <description>&lt;p&gt;HP Mini 1109TU, Small and light. But netbook is not laptop, the screen resolution is smaller. Thus, cannot play some of the games. That is why there is HD (High Definition) HP Mini.&lt;/p&gt;&#xA;&lt;p&gt;Since my netbook have most of the software similar to my laptop, yet it cannot play the games like my laptop. The function of the netbook just become a redundancy yet deficiency. Since my works are primary done using my laptop, so I want to make something special to my netbook.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
