Battery performance improvement with powertop and using xidel.

2012-12-24 1 min read Fedora Linux

For those of you, who have not heard about powertop, it is a tool to monitor the power consumption on your system. It has a tab which shows the tuneable parameters. Doing the changes suggested in those would improve the life to quite an extent. Here is the description of powertop:

PowerTOP is a tool that finds the software component(s) that makeyour computer use more power than necessary while it is idle.

Continue reading

xmlwf – Is your xml document well formed?

2012-02-18 1 min read Bash

There is a small nifty utility called xmlwf that can check your xml documents to see if they are well formed.

sudo yum install expat

Once installed, simply use :

xmlwf

Need more details, just check the man page 🙂

Enhanced by Zemanta

Using file partially for filenames

2012-02-12 1 min read Bash Learning

There are some commands that take file name and there are some case where you need to give file name. But there are some cases where you want to modify the file before passing it to the command. What do you do in these case’s?

I had a file containing huge amount of data and for some testing I wanted to pass only the first few lines of the file and not the complete file.  And since the file only accepted filename and would not take any input from the STDIN so only option was to create a file with the required data in a temporary file. So, I sat back to figure out some way to do it and finally found I can use this:

Continue reading

Tora installation on Fedora 16 with rpm

2012-02-09 1 min read Database Fedora
[TOra][1]
Image via Wikipedia

Last article I talked about tora installation from the sources, but if that is too much for you then you can use this one liner:

rpm -ivh "http://amit-agarwal.co.in/mystuff/tora-2.1.3-1.fc16.i686.rpm"

But if you like the hard way out, then you can always try this.

Enhanced by Zemanta

using `!#$’ to referance backward-word

2011-11-03 1 min read Bash Linux

Operating System Tablet Strategy
Image by jeffalldridge via Flickr

Here is something that I found on the commandlinefu

cp /work/host/phone/ui/main.cpp !#$:s/host/target

Ah well…its very interesting and very useful.

Some explanation:

!# – means the current command (similar to !! being the last command)

$ – represents the last parameter

:s – is used for substitution.

Enhanced by Zemanta

List all installed rpm packages and it’s size

2010-12-09 1 min read Fedora Linux

If you are looking for a command to see the disk usage by each of the rpm‘s then you can use this command:

  <td>
    <div class="text codecolorer">
      &nbsp;rpm -q --queryformat "%10{SIZE}\t%{NAME}\n"
    </div>
  </td>
</tr>
1

And if you use this command very regularly then you can create an alias like

  <td>
    <div class="text codecolorer">
      &nbsp;alias rpm_size='rpm -q --queryformat "%10{SIZE}\t%{NAME}\n" '
    </div>
  </td>
</tr>
1

and use it like

Continue reading
Older posts