A program to chart your bandwidth* usage in linux

Version 0.2 of inetstat has been released.

Get it from

git clone git://github.com/rjanak/inetstat.git
cd inetstat

It now includes a charter program, in order to run it, you need to have GD::Graph perl module. Either install it from system repositories or from cpan.

In Linux Mint

sudo apt-get install libgd-graph-perl

With cpan

cpan GD::Graph

Now run charter.pl in you terminal


You also have the freedom to specify an output file ( uses barchart.png by default ).

charter.pl -o mychart.png

That’s it. Have a great day!.

*by bandwidth, I’m referring to monthly data transfer.

Bash Tips

!! –> Recalls last executed command
!-1 –> Same as above
!-2:p –> Prints the second last command in history, omiting :p will yield the complete command for execution
!$ –> Last argument of the previous command
!^ –> First argument of the previous command
!-1:1-3 –> Gets 1 through 3 of the last command’s arguments

^jĀ  –> Similar to typing enter
^r –> Search history
^o –> Execute command while in a recursive search
^p –> Call previous command from history
^n –> Move forward to later commands in history
^f –> Move cursorĀ  forward by a character
^b –> Move cursor backward a character
Alt f –> Move forward by word
Alt b –> Move backward by word

^k –> Kill entire text after cursor
^u –> Cut line starting from before the cursor backwards
^w –> Cut word starting from cursor location
Alt –> D cut word after cursor
^y –> Paste killed text
^_ –> Undo
Altr r –> revert changes to original

Moving window control buttons in Lucid

Here is a simple script that will do the job.
zenity --question --ok-label="Right" --cancel-label="Left" --text="Where you want the controls to be?"
if [ $? -eq 0 ];then

zenity --question --text="Would you like to have a menu button on the left?";
if [ $? -eq 0 ];then
gconftool-2 /apps/metacity/general/button_layout --set --type string menu:minimize,maximize,close
gconftool-2 /apps/metacity/general/button_layout --set --type string :minimize,maximize,close
zenity --question --text="Would you like to have a menu button on the right?";
if [ $? -eq 0 ];then
gconftool-2 /apps/metacity/general/button_layout --set --type string minimize,maximize,close:menu
gconftool-2 /apps/metacity/general/button_layout --set --type string minimize,maximize,close:

zenity --info --text="Thats all have a good day"

Click here