top - looks better and is more useful with a rc file...

2010-05-07 1 min read Fedora Learning Linux

top is a very useful command to find out who is eating up the <a class="zem_slink freebase/en/central_processing_unit" title="Central processing unit" rel="wikipedia" href="http://en.wikipedia.org/wiki/Central_processing_unit">CPU or the memory. But sometimes the plain and simple look simply would be boring so how about some fun. Copy the below code to file : ~/.toprc

RCfile for &#8221;top&#8221;
Id:a, Mode_altscr=1, Mode_irixps=0, Delay_time=5.000, Curwin=0
Def    fieldscur=mfcAbdEgHIursOpQTvyzWjKNLX
winflags=32184, sortindx=10, maxtasks=0
summclr=4, msgsclr=5, headclr=5, taskclr=4
Job    fieldscur=ABcefgjlrstuvyzMKNHIWOPQDX
winflags=62777, sortindx=0, maxtasks=0
summclr=6, msgsclr=6, headclr=7, taskclr=6
Mem    fieldscur=ANOPQRSTUVbcdefgjlmyzWHIKX
winflags=62777, sortindx=13, maxtasks=0
summclr=5, msgsclr=5, headclr=4, taskclr=5
Usr    fieldscur=ABDECGfhijlopqrstuvyzMKNWX
winflags=62777, sortindx=4, maxtasks=0
summclr=3, msgsclr=3, headclr=2, taskclr=3

Continue reading

Solved -- Errors with afraid-dyndns in Goddard (Fedora 13)

2010-05-06 2 min read Fedora Learning Linux

Since I updated to the <a class="zem_slink freebase/en/fedora" title="Fedora" rel="homepage" href="http://fedoraproject.org/">Fedora 13, I was getting error from the <a class="zem_slink freebase/en/dynamic_dns" title="Dynamic DNS" rel="wikipedia" href="http://en.wikipedia.org/wiki/Dynamic_DNS">Dynamic DNS client for afraid. I was not getting enough time to fix this, so finally I decided to fix this in the night itself 🙂

Problem:
On running

afraid-dyndns

I was getting the error:

Entity: line 100: <a class="zem_slink freebase/en/parsing" title="Parsing" rel="wikipedia" href="http://en.wikipedia.org/wiki/Parsing">parser error : Opening and ending tag mismatch: br line 99 and div

Continue reading

Lock the hardware eject button of the cdrom

2010-04-29 1 min read Fedora Learning Linux

$ eject -i 1 This command will lock the hardware eject button of your cdrom drive. Some uses are:

1: If you have a toddler and has discovered the cdrom button

2: If you are carrying a laptop in a bag or case and don&#8217;t want it to eject if the button is inadvertently pressed.

To unlock the button use:

eject -i 0

  • <a href="http://www.commandlinefu.com/commands/view/5390/lock-the-hardware-eject-button-of-the-cdrom">View this command to comment, vote or add to favourites
  • <a href="http://feeds2.feedburner.com/commands/by/mdelatorre">View all commands by <a href="http://feeds2.feedburner.com/commands/by/mdelatorre">mdelatorre

<a href="http://www.commandlinefu.com"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/header-logo.jpg" alt="" align="bottom" />

Continue reading

String and Array Creation

2010-04-28 0 min read Learning Linux Perl
\"Perl\"
Image via Wikipedia

<img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/perl-one-liners.jpg" alt="Perl One Liners" align="bottom" />This is the fourth part of a nine-part article on famous <a class="zem_slink freebase/en/perl" title="Perl" rel="homepage" href="http://www.perl.org/">Perl one-liners. In this part I will create various one-liners for string and array creation. See <a href="http://www.catonmat.net/blog/perl-one-liners-explained-part-one/">part one for introduction of the series.

Famous Perl one-liners is my attempt to create “perl1line.txt” that is similar to “<a href="http://www.catonmat.net/blog/awk-one-liners-explained-part-one/">awk1line.txt” and “<a href="http://www.catonmat.net/blog/sed-one-liners-explained-part-one/">sed1line.txt” that have been so popular among Awk and Sed programmers.

Continue reading

How To Modify Your Wordpress Theme Via The Browser Using Stiqr

2010-04-27 6 min read Learning Uncategorized

<a href="http://feedads.g.doubleclick.net/%7Ea/O7jc_lFA7WTnPLGHjbYaxjhpRBM/0/da"><img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/%7Ea/O7jc_lFA7WTnPLGHjbYaxjhpRBM/0/di" alt="" align="bottom" />
<a href="http://feedads.g.doubleclick.net/%7Ea/O7jc_lFA7WTnPLGHjbYaxjhpRBM/1/da"><img src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/%7Ea/O7jc_lFA7WTnPLGHjbYaxjhpRBM/1/di" alt="" align="bottom" />

<img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/00_Stiqr_logo.jpg" alt="00_Stiqr_logo.jpg" width="253" height="114" align="bottom" />Ordinary <a href="http://www.makeuseof.com/tag/how-to-build-a-self-hosted-wordpress-blog-for-free/">self-hosted WordPress users know only too well that even though choosing and using thousands of available themes is a snap, creating one is an almost impossible task. You could use <a href="http://www.makeuseof.com/tag/customize-design-wordpress-theme-easily-constructor/">one of the customizable themes to modify the look to your liking, but that’s as far as you can go. Theme creating is not for the faint-hearted who are afraid to plunge into <a class="zem_slink freebase/en/html" title="HTML" rel="wikipedia" href="http://en.wikipedia.org/wiki/HTML">HTML, <a class="zem_slink freebase/en/php" title="PHP" rel="homepage" href="http://www.php.net/">PHP and <a class="zem_slink freebase/en/cascading_style_sheets" title="Cascading Style Sheets" rel="wikipedia" href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets">CSS coding.

Continue reading

Linux Shell Scripting Tutorial – A Beginner\’s handbook

2010-04-11 0 min read Bash Learning Linux
\"Tux,
Image via Wikipedia

<a class="zem_slink freebase/en/unix_shell" title="Unix shell" rel="wikipedia" href="http://en.wikipedia.org/wiki/Unix_shell">Linux Shell Scripting Tutorial – A Beginner&#8217;s handbook —

This book is for students and Linux System Administrators. It provides the skills to read, write, and debug <a title="Linux" href="http://bash.cyberciti.biz/guide/Linux">Linux <a class="zem_slink freebase/en/shell_script" title="Shell script" rel="wikipedia" href="http://en.wikipedia.org/wiki/Shell_script">shell scripts using <a title="Bash" href="http://bash.cyberciti.biz/guide/Bash">bash <a title="Shell" href="http://bash.cyberciti.biz/guide/Shell">shell. The book begins by describing <a title="Linux" href="http://bash.cyberciti.biz/guide/Linux">Linux and simple scripts to automate frequently executed commands and continues by describing conditional logic, <a class="zem_slink freebase/en/interactivity" title="Interactivity" rel="wikipedia" href="http://en.wikipedia.org/wiki/Interactivity">user interaction, loops, menus, traps, and functions. Finally, book covers various sys admin related scripts such as making a backup, using <a class="zem_slink freebase/guid/9202a8c04000641f80000000045c9c5b" title="Cron" rel="wikipedia" href="http://en.wikipedia.org/wiki/Cron">cron jobs, writing interactive tools, web based tools, remote login, ftp and database backup related scripts. This book is intended for Linux <a class="zem_slink freebase/en/system_administrator" title="System administrator" rel="wikipedia" href="http://en.wikipedia.org/wiki/System_administrator">system administrators or students who have mastered the basics of a Linux Operating System. You should be able to:

Continue reading

Script to get the number of events from the logs.

2010-04-11 2 min read Learning Linux Perl

<a id="aptureLink_4P0PJ73NaG" style="margin: 0pt auto; padding: 0px 6px; text-align: center; display: block;" href="http://en.wikipedia.org/wiki/Log%20analysis"><img style="border: 0px none;" title="Log analysis" src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/ph/360x320_WikipediaArticle" alt="" width="360px" height="320px" />

I was trying to do some <a class="zem_slink freebase/en/log_analysis" title="Log analysis" rel="wikipedia" href="http://en.wikipedia.org/wiki/Log_analysis">log analysis and finding the events in the logs. For this the logs had the Events logged as &#8221;|+Event name|&#8221; or with sending and receiving. So I wrote this little script to take care of my requirements.

Continue reading
Older posts Newer posts