*NIX

Reading winmail.dat in Ubuntu Edgy

I have just received an email contained an attachment namedly winmail.dat. At the first glance, I guessed that it must be a kind of microsoft format. My email reader, Mozilla Thunderbird should recognize it seamlessly. Sadly, it tried to open winmail.dat in MPlayer. However, I found a better way to read that file.

Install Emacs on Ubuntu Edgy

According to BTD2 yesterday, I spent a period of time to try the legendary editor called Emacs once again. This is not my first time to try. Anyway, it might be worth if it is capable to edit my note with Thai language in UTF-8 encoding since GVim doesn't serve me right.

Port forward in VMware Server for Linux

VMware Server is totally free. All you need is just to register your name and address to obtain a number of serial numbers. You may get up to 100 serial numbers at a time. In VMware, there are 3 network types: bridge, nat, and host-only. Bridge is the most powerful one but you need an extra IP address. If you don't have one, you might be interesting in nat or host-only. Nat seems to be better to keep your guest OS up-to-date and connected to the internet. However, Nat means you can't connect to the guest OS directly from internet so you can't run it as a server. Anyway, it is possible to forward port to the guest OS behind VMware's nat.

What if publickey authentication does not work

There are so many problem that may cause publickey authentication scheme in ssh (or more specific, openssh) to not work properly. Usually, I have never encountered this problem for so long. I have just found this problem again in fresh CentOS 4.4.

วิธีง่ายๆ ในการใช้งาน vim syntax color

บางครั้งคุณอาจจะรู้สึกเบื่อหน่ายในการแก้ code บางอย่างใน terminal ของ *nix หรือ linux เนื่องจากมันไม่มีสีแยกแยะให้แก้ไขได้ง่ายๆ ดังนั้นเรามาลองทำกันไหม ว่ามันทำได้อย่างไรบ้าง (ขออ้างอิงจาก linux เป็นหลัก และบาง distro เท่านั้น ในที่นี้ขออ้างอิงจาก centos ในเรื่องของ pkg)

Find old files using find, du and awk

My friend provides a shared disk space among trusted friends. Everybody are allowed to upload files to and download files from this space. The problem is that free space run out so fast. I have to help him identify oldest files to remove. If you are on *nix-based operating system, you might know about "find", "du" and "awk". To simplify this tip, I will demonstrate how to use find effectively.

  • You want to find files modified exactly 7 days ago.
    find . -ctime 7
  • You want to find files modified 7 days ago or older.
    find . -ctime +7