Friday, July 13, 2012

Extract cpio files

Following command can be used to extract cpio files.

cpio -idmv < databasebackup.cpio

Thursday, July 12, 2012

Set Timezone in Redhat Linux

Edit the /etc/sysconfig/clock and set the time zone as following.

# The ZONE parameter is only evaluated by system-config-date.
# The timezone of the system is defined by the contents of /etc/localtime.
ZONE=Asia/Colombo
UTC=false
ARC=false

Then set the TZ variable as follows or set it in the .bash_profile.

export TZ=/usr/share/zoneinfo/Asia/Colombo
Now check the date/time using date command.

 Also the command tzselect can be used to change the time zone.