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.
So, here is something that you can do to quickly apply the changes suggested by tuneable parameters.
First, get the report in html format using
sudo powertop --html
With this you will get powertop.html and now quickly get the xidel binary from sourceforge site. Once you have got that exeute the command
xidel powertop.html -e "css('html body div#tuning table tr td:nth-child(2)')"
This will show you all the tuneable parameters of your system 🙂
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 :
Need more details, just check the man page 🙂
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:
testcommand -f<(head -1 )
The “testcommand” parameter “-f” requires a filename. And here we are passing the file to the command after filtering it with head command. You can use any bash command inside the <() combination.