sed tutorial and help
A very nice turorial and help <a href="http://sed.sourceforge.net/grabbag/tutorials/">here.
A very nice turorial and help <a href="http://sed.sourceforge.net/grabbag/tutorials/">here.
<a href="http://lifehacker.com/398441/get-to-know-grep">http://lifehacker.com/398441/get-to-know-grep
This is quite useful for viewing files without opening them.. Saves quite a lot of time in viewing the logs 🙂
Want to see the first 5 lines of the /etc/passwd file? Pretty easy, just use the "head" command:
head -5 /etc/passwd
Want to see the last 20 lines of the /etc/passwd file? Again, pretty easy, just use the "tail" command:
tail -20 /etc/passwd
But what if you only want to see lines 10-15 of a given file? Neither the "head" nor the "tail" commands alone will do. Instead, use the "sed" command to print the range of lines you want to see:
Continue readingThis post if applicable to all the distro’s which are based on rpm.
If you look at the number of rpms installed on your system, you will see it somewhere around 500-2000. Noe thats a pretty huge number. So sometimes I keep wondering what are these rpms for. Heres a command that can help you figure out what these rpms are for:
rpm -qa –info
And if you want to find info on all the files and put it in a file too:
Continue readingI have been thinking of posting this for some time, but here are some stats from my <a class="zem_slink freebase/en/website" title="Website" rel="wikipedia" href="http://en.wikipedia.org/wiki/Website">website:
OS Stats :
<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/OS.jpg"><img class="size-full wp-image-1516" title="OS stats for blog.amit-agarwal.co.in" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/OS.jpg" alt="OS stats for blog.amit-agarwal.co.in" width="429" height="311" />
Continue readingSometimes I end up having some invalid characters in filename like ? & and so on.
So simple bash script to get rid of them:
for i in `find . -type f`
do
echo $i
mv $i `echo $i |tr ? _|tr = _ |tr ’&’ ’_’`
done <a name="more">
I was having this issue for long time with sendmail and not getting time to fix this. Finally today I found the solution.
<span style="font-weight: bold;">define(`confBIND_OPTS’, `WorkAroundBrokenAAAA’)dnl
Add the above line in the sendmail.mc file and rebuild sendmail.cf.
Done. Quite simple but really took some time for me to fix.<span style="font-weight: bold;">
Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/Linux" rel="tag">Linux, <a class="performancingtags" href="http://technorati.com/tag/sendmail" rel="tag">sendmail, <a class="performancingtags" href="http://technorati.com/tag/AAAA" rel="tag">AAAA, <a class="performancingtags" href="http://technorati.com/tag/failure" rel="tag">failure