vmstat – what it is and how to use?

2011-04-24 2 min read Linux
Image via Wikipedia vmstat provides a summary of various functions within the system, including system wide free memory, paging counters, summarized disk activity, system calls and cpu utilization. The output of vmstat and description of what each field means: The first line of output from vmstat shows a summary since boot, followed by the output over the last 3 seconds for each additional line. The vmstat command reports the amount of swap space that is free (not reserved or allocated). Continue reading

Photography – Stock photos on bigstock.

2011-02-01 1 min read Photo
Couple of days back, one of my friends suggested that I put my photos on bigstock also along with my site at http://shop.amit-agarwal.co.in . I thought, let me give it a try and created a account on bigstock. After creating the account, I have so far submitted 5 images and four of them got rejected. The rejections did not de-motivate me, in-fact this has taught me a lot of things. Continue reading

let a cow tell you your fortune

2010-06-03 1 min read bash Linux
Here\’s something that I saw on commandlinefu yesterday. That sent me thinking about some command to have the cow file picked randomly 🙂 So, here\’s the original command from the commandlinefu: let a cow tell you your fortune 1 <td> <div class="text codecolorer"> $ fortune | <a class="zem_slink freebase/en/cowsay" title="Cowsay" rel="homepage" href="http://www.nog.net/%7Etony/warez/cowsay.shtml">cowsay</a> -f tux </div> </td> </tr> </table> Let

Finding all numbers that are bigger than 1 in vim

2009-12-24 1 min read Fedora Linux Vim Tips
/^([2-9]d*|1d+) If we have a csv like structure The trick here is simple, lets look at the regex from the begining: ^ – start from the begining () – start and end of block [] – digits within this. So we are looking from 2 to 9 to exclude the numbers begining with 1 d – search for digits – search for one or more | – or operation Continue reading