How to check different man pages in linux?

This is a quick note and I will write about this subject later in another post.
The first thing you want to do is, check and see what are the manual pages available for your command:

$ man -f command

then call the page number after man command and before your command. Take a look at the example:

$ man -f mkdir
mkdir                (1)  – make directories
mkdir                (1p)  – make directories
mkdir                (2)  – create a directory
mkdir                (3p)  – make a directory
$ man 1p mkdir

The last command will open “POSIX Programmer’s Manual” for the mkdir command.

Cheers!

Perform offline update on Virtual Machines (CentOS 6.3 – Fedora 17, 18)

The whole update process on new installed VMs are painful and since you have to download all the updates as many as VMs that you have, it accompanies with bleeding as well! I have 3 VMs that requires to be up to date. I looked up for a better way in order to perform the update process. The result is the followings:

  1. If you have the same OS on all of your VMs and host, then on either of your HOST or one of your VMs do the followings as super user:
    # yum install yum-downloadonly
    “yum-downloadonly” can be used to only download the packages which in my case are rpm packages.
    You may use the following options:
    –downloadonly : don’t update, just download an rpm file
    –downloaddir=/path/to/dir : specifies an alternate directory to store packages such as /tmp
  2. Create a directory called update in your /tmp and download the packages to your /tmp/update:
    # yum update -y –downloadonly –downloaddir=/tmp/update/
  3. In order to install/update the packages, switch to the /tmp/update directory and run this:
    # yum localinstall *.rpm
  4. use scp to copy over the update folder to other VMs and update other machines.

Enabling clipboard transfer (Copy + Paste) in RedHat KVM

To enable copy and paste between virtual machines and host in RedHat KVM do the followings:

  1. Shutdown you machine if it is turned on.
  2. Click on “Show virtual hardware details“.
  3. Choose the “Display VNC” hardware and set the type to “Spice
  4. Click Apply and choose YES to the “You are switching graphics type to spice, would you like to add Spice agent channels?” question.
  5. Now, select Video and set the Model to “qxl” and click apply.
  6. Turn on your machine and login.
  7. Run the followings as super user:
# yum install spice-vdagent
# chkconfig --add spice-vdagentd
# service spice-vdagentd start
# ps -ef | grep vdagent
root      1855     1  0 20:19 ?        00:00:00 /usr/sbin/spice-vdagentd
gdm       2148     1  0 20:19 ?        00:00:00 /usr/bin/spice-vdagent
alireza   2338     1  0 20:20 ?        00:00:00 /usr/bin/spice-vdagent
root     29552 29510  0 22:21 pts/0    00:00:00 grep vdagent

Display Type Video Type

Enjoy the copy and paste ability between your VMs and Host.

Cheers!