Friday, December 10, 2010

How to avoid writing sudo every time

If you are a sudoer and want to aovid writing sudo every time (like sudo commandname), just invoke a shell as root
sudo bash
Then you can execute all the commands as root.

**!! when you are finished do not forget to exit from the shell
 exit

Wednesday, December 8, 2010

How to install Flash Player for Mozilla firefox web browser

*Download the latest Flash Player from Adobe web site.
  http://www.adobe.com


*Select version to download

     YUM for linux
     .tar.gz for linux
     .rpm for linux  

     .deb for Ubuntu
     APT for Ubuntu


1. YUM for linux (RedHat, fedora)
install the downloaded .rpm file using rpm command.
rpm -ivh rpmfile.rpm
this will install adobe repository on your system.
now you can use yum command to install flash player.
yum install flash-plugin

2. .tar.gz for linux (for any distribution)
extract the .tar.gz file using tar command
tar xvf tarfile.tar.gz
you will get a file named libflashplayer.so. Copy this file to the mozilla plugins directory.
cp libflashplayer.so /usr/lib/mozilla/plugins/
change the permissions of the file if required.
Restart the firefox browser.

3. .rpm for linux (for RedHat, fedora)
install the .rpm file using rpm command
rpm -ivh rpmfile.rpm
verify the flash player plugin using the following command
ls /usr/lib/mozilla/plugins/
now restart the browser.

4. .deb for linux (Ubuntu)
install the .deb file using dpkg command
dpkg -i debfile.deb
verify the flash player plugin in mozilla/plugins directory.

5. APT for linux (Ubuntu)
install the .deb file using dpkg command
dpkg -i debfile.deb
this will install adobe repository on your system.
Now you can use the apt-get command to install flash player.
apt-get install flash-plugin.

Restart your web browser.






Wednesday, December 1, 2010

Output man pages as plain text with col

There is an easy way to convert man pages into simple, non-redundant text.
To save a copy of any man page to text simply type:

man command_name | col -b > output_file_name

e.g.;

man ls | col -b > grep.txt

This can be especially useful for larger man pages, as you can now open
and work with the text file in any GUI text editor.