I sometimes want to monitor the progress of a copy or backup job on the console. The trick to do that is as follows:

while true; do something…; sleep 10; clear; done;

example:

[tom@ns2 ~]# while true; do df- h /media/usr; sleep 10; clear; done;

 

What this is, it display the size of /usr partition, the used space, available space and the progress of the job in percentage. The “clear” command will make sure all these informations are shown on a single line by clearing the screen. The clear command is very cool ;-)

It hope someone find this useful 

Download the network installation iso file and burn to CD.
Place the CD in the CD-Rom and reboot the system.
When ask to select the network install method, choose “HTTP” and enter the following:

1) for 32 Bit
Host: mirror.centos.org
Directory: centos/6.4/os/i386

2) for 64 Bit
Host: mirror.centos.org
Directory: centos/6.4/os/x86_64
Written on May 4th, 2013 , CentOS, Linux, Linux Installation, Recent Posts

Download the network installation iso file and burn to CD.

Place the CD in the CD-Rom and reboot the system.

When ask to select the network install method, choose “HTTP” and enter the following:

1) for 32 Bit
Host: mirror.centos.org
Directory: centos/6.3/os/i386

2) for 64 Bit
Host: mirror.centos.org
Directory: centos/6.3/os/x86_64

Written on November 13th, 2012 , CentOS, Linux, Linux Installation, Recent Posts

I recently used the netinstall CentOS CD to install one of my Linux systems. During the installation process, I decided to install CentOS 6.3 minimal to quiken the overall install process. After the successful installation, I decided it was time to add Gnome/GUI to the system. The following were the steps taken to achive this task.

First, it is worth mentioning that there are two versions of this installation.

a.) Short version

b.) Long version

 

STEPS:

a. ) Short version:

Start a new terminal and enter the following:

yum -y groupinstall basic-desktop basic-platform x11 fonts

b.) Long version:

yum -y install “Desktop” “Desktop Platform” “X Window System” “Fonts”

 

That’s it! It will work regardless the method used ;-)

Written on November 10th, 2012 , CentOS, Linux, Linux Installation, Recent Posts

A swap file is an ordinary file that is in noway special to the kernel. The purpose of the swap file is to reserve the disk space so that the kernel can quickly swap out a page without having to go through all the things that are necessary when allocating a disk sector to a file.Because a hole in a file means that there are no disk sectors allocated (for that place in the file), it is not good for the kernel to try to use them.

In order to create the swap file without holes, use the following command:

1.) Assuming we want to create a swap file with 2GB size (1024 x 1024 x 2 = 2097152).

[bash]# dd if=/dev/zero of=/swapfile bs=1024 count=2097152

     where if is source, of is output file for dd to write to which is /swapfile in this case, bs is read/write byte size at a time and count is number of blocks.

2.) The next step is to make it a swap file

[bash]# mkswap /swapfile

3.) Activate the swap file

[bash]# swapon /swapfile

4.) Check the newly created swap space usinf free or top

[bash]# free -m

     or 

[bash]# top

5.) Write it to fstab to make it available for the system even after a reboot

[bash]# echo swapfile swap swap defaults 0 0 >> /etc/fstab

 

**) Using cat give you the following output:

[bash]# cat /etc/fstab
/swapfile1 swap swap defaults 0 0
Written on December 20th, 2011 , Linux, Linux Installation, Recent Posts

OMOTECH Tips & Tricks is proudly powered by WordPress and the Theme Adventure by Eric Schwarz
Entries (RSS) and Comments (RSS).

OMOTECH Tips & Tricks

this blog offers tutorials based on various it-subjects