Pipeing linux commands and their output

2009-12-08 1 min read Linux

As a system administrator, I always worry about certain things, like who's doing what, what processes are running, what the network traffic looks like, etc.  One day I decided to create a simple alias that would combine all the commands I wanted into one big chunk of information.  Then I realized that it wouldn't all fit into one screen.
Fortunately I knew how to group all of the commands together, so the "more" command could handle them as one set of input.

Continue reading

Change phpMyadmin theme.

2009-12-08 1 min read Linux

Changing the phpMyAdmin theme is as easy as downloading a theme from <a href="http://www.phpmyadmin.net/home_page/themes.php" target="_blank">here. Then look at your /etc/httpd/conf.d/phpMyAdmin.conf file and check the line similar to

Alias /phpMyAdmin /phpMyAdmin

The second path is the path to your phpMyAdmin installation. Go to that directory and then go to themes directory and unzip the file. Reload your phpMyAdmin page in browser and select the newly installed theme 🙂

View the newest xkcd comic.

2009-12-07 1 min read Bash Linux

This function displays the latest comic from xkcd.com. One of the best things about xkcd is the title text when you hover over the comic, so this function also displays that after you close the comic.

$ xkcd(){ local f=$(curl -s <a href="http://xkcd.com/">http://xkcd.com/);display $(echo "$f"|grep -Po '(?<=")http://imgs.xkcd.com/comics/[^"]+(png|jpg)');echo "$f"|awk '/<img src="http://imgs.xkcd.com/comics/.?" title=./{gsub(/^.title=.|".?$/,"");print}';}

To get a random xkcd comic, I also use the following:

xkcdrandom(){ local f=$(wget -q <a href="http://dynamic.xkcd.com/comic/random/">http://dynamic.xkcd.com/comic/random/ -O -);display $(echo "$f"|grep -Po '(?<=")http://imgs.xkcd.com/comics/[^"]+(png|jpg)');echo "$f"|awk '/<img src="http://imgs.xkcd.com/comics/.?" title=./{gsub(/^.title=.|".?$/,"");print}';}

Continue reading

Insert a comment on command line for reminder

2009-12-05 1 min read Bash Linux

<a href="http://blog.amit-agarwal.co.in/category/linux/">Bookmark this category
Insert a comment on command line for reminder

$ ls -alh #mycomment

Comments can be used directly on the command line so I can save in the history a brief description of what command does.

* View this command to comment, vote or add to favourites * View all commands by vgagliardi

commandlinefu.com

by David Winterbottom (codeinthehole.com)

URL: <a href="http://feedproxy.google.com/~r/Command-line-fu/~3/_5hXsFUuAwc/insert-a-comment-on-command-line-for-reminder">http://feedproxy.google.com/~r/Command-line-fu/~3/_5hXsFUuAwc/insert-a-comment-on-command-line-for-reminder

Happy Diwali wishes

2009-12-01 1 min read Linux

All the BEST and my best wishes for Diwali to all my readers.

<img title="Diwali Wishes" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/12/diwali-fireworks-cc-sumith-meher.jpg" alt="Diwali Wishes" width="800" height="799" />

<img title="Diwali Celebrations" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/12/windowslivewriteramazingbangaloreasolaceinpictures-a3b8diwali21.png" alt="Diwali Celebrations" width="640" height="382" />

Sorry about the delay in the wishes.. was held up with one of my 250GB HDD crashing..

Linux Installation Guide

2009-11-25 1 min read Linux

Paradise for Linux Installation Guides on laptops is <a href="http://tuxmobil.org/mylaptops.html" target="_blank">here. Can you imagine that this tuxmobile page hosts around 8,000 guides on Linux Installation on Laptops. I assume that this will be probably the biggest list on single page for Linux installation. The page lists various hardwares of laptop where you can install linux and how to install it.

So what are you waiting for … got a laptop, see if yours is listed here.

Continue reading
Older posts Newer posts