bash one liner to change/remove test pattern from config file or text file.

2010-06-25 1 min read Bash Fedora Learning Linux

Problem:

I had a directory with a lot of config files in the ini file format, i.e. name and value separated by equals. Some/all of these contained some directory names and other values which had to be replaced. But there were other place where I should not not replace them, if there was no exact match. I also needed to have a backup copy of the file that I was modifying. Since the number of files that I needed to change was multiple so was quite difficult to do it without using some script.

Continue reading

Visualizing system performance data

2010-06-25 1 min read Linux

<a href="http://blog.amit-agarwal.co.in/category/linux/">Bookmark this category

<font SIZE="6"><a HREF="http://feedproxy.google.com/~r/Command-line-fu/~3/jjk4Htw9rvo/visualizing-system-performance-data">Visualizing system performance data

$ vmstat 2 10 | awk 'NR > 2 {print NR, $13}' | gnuplot -e “set terminal png;set output 'v.png';plot '-' u 1:2 t 'cpu' w linespoints;" draw `vmstat ` data using gnuplot

  • <a HREF="http://www.commandlinefu.com/commands/view/3581/visualizing-system-performance-data">View this command to comment, vote or add to favourites
  • <a HREF="http://feeds2.feedburner.com/commands/by/Sunng">View all commands by <a HREF="http://feeds2.feedburner.com/commands/by/Sunng">Sunng

<a HREF="http://www.commandlinefu.com"><img SRC="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/header-logo.jpg" ALIGN="bottom" ALT="commandlinefu.com"/>

by David Winterbottom (<a HREF="http://codeinthehole.com">codeinthehole.com)

Continue reading

A Unix/Linux cheatsheet complete in most respects.

2010-06-25 1 min read Linux

Find <a href="http://cb.vu/unixtoolbox.xhtml" target="_blank">here. This is a very nice tutorial all in one page and browsable.

It covers :

1.   System
2.   Processes
3.   File System
4.   Network
5.   SSH SCP
6.   VPN with SSH
7.   RSYNC
8.   SUDO
9.   Encrypt Files
10.   Encrypt Partitions
11.   SSL Certificates
12.   CVS
13.   SVN
14.   Useful Commands
15.   Install Software
16.   Convert Media
17.   Printing
18.   Databases
19.   Disk Quota
20.   Shells
21.   Scripting
22.   Programming
23.   Online Help

Continue reading

Desktop with cairo-dock

2010-06-25 1 min read Linux

Just love the look now.

Heres the screenshot:

<img class="size-full wp-image-472" title="Desktop" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/desk.jpg" alt="Desktop" width="840" height="525" />

Older posts Newer posts