junk food for the brain …
raja
The owner of this site ;)
Homepage: http://rajaseelan.com
Posts by raja
Generate Files with Random Content and Size in Bash
July 29, 2009 - 12:37 am
Tags: bash, dd, files, generate, How To, Linux, random, script
Posted in How To, Linux | No comments
Occasionally you need to generate a bunch of random files with random content, usually for testing compression, user quotas or miscellaneous stuff.
Here’s one way, using the bash shell and a few handy linux utilities.
The bash $RANDOM function. It generates a random number between 0 – 32767.
Linux DD utility, to output files.
/dev/(h|s)da, your hard drive in [...]
How to Enable Flash in Google Chrome for Fedora 11 i686
July 27, 2009 - 11:45 pm
Tags: chrome, fedora, fedora 11, flash, flash-plugin, How To, install
Posted in How To, Linux | 4 comments
So you’ve installed the latest development builds of Chromium for Fedora Linux. The only thing lacking is that youtube is not loading. If not, what are you waiting for? Refer to one of my previous posts.
First make sure you install the Adobe yum repository.
As root:-
rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
Then install the flash plugin.
yum install flash-plugin.i386
The flash plugin [...]
Temporarily Disable a Yum Repository
July 24, 2009 - 6:52 pm
Tags: disable, fedora, repo, repository, temporary, yum.
Posted in How To, Linux | 1 comment
Sometimes, you may run into problems updating Fedora via yum. What you could do is temporarily disable the offending repository, and update everything else while the errors are being fixed upstream.
List out your enabled yum repositories.
$ yum repolist
You would get something like this:
[raja@atreides ~]$ yum repolist
Loaded plugins: fastestmirror, presto, refresh-packagekit
repo id [...]
Configure a Caching-Only Name Server in a Chroot Environment for Fedora 11
July 18, 2009 - 8:39 pm
Tags: bind, caching-nameserver, caching-only, chroot, fedora, fedora 11, How To, Linux, named, nameserver
Posted in How To, Linux | 5 comments
Having a caching only name-server on your local Machine speeds up your browsing. Here’s how to set up a slightly more secure caching server using ISC Bind in Fedora 11.
Install bind and bind-chroot packages
# yum install bind bind-chroot
Edit your /etc/sysconfig/named file.
# vim /etc/sysconfig/named
Add the following line:
ROOTDIR="/var/named/chroot"
Edit your /etc/named.conf file.
# vim /etc/named.conf
Change the following line:
listen-on port [...]
Change Your MAC Address in Linux
July 16, 2009 - 4:38 pm
Tags: address, ethernet, how, How To, hwaddr, ifconfig, Linux, mac
Posted in Misc | 1 comment
Some times it necessary to change your network MAC address on your linux box.
Unlike Windows, which requires some registry editing or even specialized tools, its just a command line away in Linux.
For example, lets change the MAC address of your first netwrok card, usually called eth0.
Let’s swith to being the root user and view the [...]
Find a Cheap VPS Hosting Provider
July 16, 2009 - 10:34 am
Tags: cheap, hosting, vps
Posted in Tech | 5 comments
With VPS hosting becoming a more popular option among the techies, I’ve been tempted to get one.
Among the reasons you’ve like to get a VPS include:-
You need root access
You wish to install a distro of your choice
Want more capabilities than offered by standard shared hosting
You have Ruby On Rails or Python Based Web Apps [...]
Check Your Spelling in Linux using the Command Line
July 15, 2009 - 3:51 pm
Tags: aspell, cli, How To, ispell, Linux, spell check, spellcheck
Posted in Misc | No comments
You can do a spell check on from the command line in Linux.
First, make sure you have aspell installed. In Fedora, just yum install it.
$ yum install aspell
You’ll also need a dictionary, from which aspell can search for words.
A yum search aspell will give you a list.
[raja@atreides visilon]$ yum search aspell
———————————————————–
aspell-af.i586 : Afrikaans dictionaries [...]
Stop Vim from Highlighting Search Results
July 14, 2009 - 6:40 pm
Tags: highlight, higlighting, hlsearch, no higlights, nohl, search, vi, vim
Posted in Misc | 2 comments
You can search to words in vim using the ‘/’ key when you’re in command mode. Unfortunately, new admins in their desperation to find a word may inadvertently specify a term too generic.
Vim provides search highlighting, but sometimes, the results are just plain fugly. For example, when searching for the word module in a httpd.conf [...]
Police report against Al-Islam
July 14, 2009 - 1:01 pm
Tags: the-why-cant-we-just-get-along-dept
Posted in Life, Misc | No comments
Sigh. Never thought I’d bog about this.
Can’t people just live together?
Henotheism (Greek εἷς θεός heis theos “one god”) is a term coined by Max Müller, to mean worshiping a single god while accepting the existence or possible existence of other deities.
Fully explained here, in the one & only Wikipedia.
How to Mass Rename Files in Linux
July 12, 2009 - 10:12 pm
Tags: bash, cli, files, How To, Linux, mass rename, rename, script, scripting, sed
Posted in How To, Linux | 2 comments
When entrusted with the chore of renaming multiple file, the convenience of a script shines. After all, we ain’t robots designed to do just one thing. Today, I’ll show one method of renaming files, using a for loop in bash.
First, the task we are going to do:
We have a list of files:
[raja@atreides test]$ ls
data_file_1 [...]