Viewing log files without using vi or any other text editor

2010-01-16 1 min read Linux

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 reading

View information on all the rpms installed.

2010-01-16 1 min read Fedora Linux

This 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 reading

using mypaint of linux continued.

2010-01-16 1 min read Fedora Photo

Some more screenshots here:
<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/10/Screenshot-3.resized.jpg"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-3.resized-150x150.jpg" alt="Screenshot-3" title="Screenshot-3" width="150" height="150" class="size-thumbnail wp-image-1283" />

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/10/Screenshot-4.resized.jpg"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-4.resized-150x150.jpg" alt="Screenshot-4" title="Screenshot-4" width="150" height="150" class="size-thumbnail wp-image-1284" />

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/10/Screenshot-6.resized.jpg"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-6.resized-150x95.jpg" alt="Screenshot-6" title="Screenshot-6" width="150" height="95" class="size-thumbnail wp-image-1285" />

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/10/Screenshot-8.resized.jpg"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-8.resized-150x145.jpg" alt="Screenshot-8" title="Screenshot-8" width="150" height="145" class="size-thumbnail wp-image-1286" />

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/10/Screenshot-7.resized.jpg"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-7.resized-150x150.jpg" alt="Screenshot-7" title="Screenshot-7" width="150" height="150" class="size-thumbnail wp-image-1287" />

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/10/Screenshot-9.resized.jpg"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-9.resized-150x150.jpg" alt="Screenshot-9" title="Screenshot-9" width="150" height="150" class="size-thumbnail wp-image-1288" />

[ad#ad-1]

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/10/Screenshot-10.resized.jpg"><img src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-10.resized-150x150.jpg" alt="Screenshot-10" title="Screenshot-10" width="150" height="150" class="size-thumbnail wp-image-1289" />

Continue reading

Browser and OS stats on my blog

2010-01-16 0 min read Uncategorized
\"{{en|Summary:
Image via Wikipedia

I 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 reading

Speed up gnome and change widow manager for gnome.

2010-01-13 3 min read Linux

I have been planning to do this for quite some time now. So finally I did this today. Actually I wanted to use some features of gnome like tracker and gnome-settings and quite a few other things along with running cairo-dock and still wanted the system to use less memory and faster response. It is well known fact that gnome/kde takes a lot of memory and CPU thus wanted to run some other window manager like fluxbox or blackbox. I went with fluxbox, as that suits my needs very well, so heres what I did:

Continue reading

Send mail to yourself and read in your favourite client and configure the rules to move to directory.

2010-01-10 2 min read Fedora Linux

By default when you send a mail using sendmail, the mail goes to the default directory. What I wanted to do was, use rss2email, to send the mails and then sort them in different folders depending on the From address.

Sendmail uses procmail to deliver mail locally. So here&#8217;s what I had to do:

Configure the rss2email to send the mail to amit@localhost

Next, configure the procmail to deliver mail to my home directory. To do this we will use the procmailrc file in the home directory. The contents of the file are :

Continue reading
Older posts Newer posts