Wednesday, March 30, 2011

List Tar file contents on AIX

tar -tvf filename.tar

Friday, March 25, 2011

Get Time from Oracle DB in SQLPlus

select systimestamp from dual;

Thursday, June 3, 2010

Blog Moved to Wordpress

Blog moved to which redirects to

Wednesday, May 26, 2010

New Primary HDD: A full Ubuntu backup & restoration experience (Draft)

  1. Use "SystemRescueCD"
  2. "fsarchiver savefs"
  3. "fsarchiver restfs"
  4. mount /dev/sda1 /mnt
    mount /dev/sda2 /mnt/boot  #skip this if don't have a separate /boot partition
    grub2-install --root-directory=/mnt/ /dev/sda
Operation Stats:
  • Original Disk Space used on the HDD to backup: 45 GB
  • Size of the backup images using "fsarchiver" default settings: 30 GB
  • Time taken to restore the whole HDD: around 45 min.
  • Bootloader restoration (grub2): 1 min.
Impression: Very fast, very little disk space used, very happy :)

Tuesday, May 18, 2010

Install Bluecurve theme on Ubuntu box

Here's the way to install Redhat's most famous theme "Bluecurve":
It worked me on Ubuntu 10.04

Monday, May 17, 2010

convert files from one encoding to another using iconv

I have subtitles that was written on M$ windows that were saved using WINDOWS-1256 encoding and were not working on my Linux box.

I found this command to convert from one encoding to another:

iconv -f WINDOWS-1256 <Ice_age_3.sub> Ice_age_3_utf8.sub

Thursday, May 13, 2010

Display CPU Temperature Graphically using a Panel Applet in Ubuntu

"sudo apt-get install sensors-applet"

Right-click on any panel and add the new applet, then easily configure it to display the temperature, fan speed, HDD temperature ...etc

know the return value of a native (c) program in linux

Hi folks
use this command:
echo $?
to know the return value of a native program in Linux.
try it yourself:

scenario 1:
echo $? #(watch the result, it will be 1, which means unsuccess)

scenario 2:
echo "hello world" > file
more file
echo $? #(watch the result, it will be 0, means success)

Wednesday, May 12, 2010

Create NTFS Partition with gparted in Ubuntu

The "ntfs" option is dimmed by default, to enable it you should install the necessary package: "sudo apt-get install ntfsprogs"

That's it, just re-open gparted and you're ready to go :)

Get CPU Temperature From Command Line in Ubuntu

more /proc/acpi/thermal_zone/THM0/temperature
more /proc/acpi/thermal_zone/THM1/temperature

As I have two processors "THM0" and "THM1"


Permanently Blacklist a Kernel Module in Ubuntu

  1. Edit "/etc/modprobe.d/blacklist.conf"
  2. Add the module you want to remove, e.g. to blacklist the "kvm_intel" module, add this line "blacklist kvm_intel"

Thursday, May 6, 2010

Disable a Laptop's Touchpad in Ubuntu Karmic (and later as I well I guess)

  1. Applications -> Ubuntu Software Center
  2. Search for Touchpad
  3. System -> Preferences -> Touchpad
  4. Untick "Enable Touchpad"

Tuesday, May 4, 2010

How to uncompress zip file on AIX

To uncompress a zip file on AIX, use "unzip" command:

Friday, April 30, 2010

Install Linux Distro. without burning on CDs

While searching, I found this cool program that enables you to burn Linux Distro. on USB Devices

Download Internet Files from the terminal in Ubuntu

wget url

e.g. wget