query and downgrade selected packages based on version or repository

2009-12-24 1 min read Fedora Linux

If you have worked on rpm based distro then you know how difficult it is to downgrade packages. And unluckily I upgraded some packages to fc12 and was still on FC11. Completely my mistake while doing some R&D. Anyway to downgrade I had to device some mechanism and here it is:

rpm -qa –qf ”%-30{NAME}%-20{RELEASE}\n” |grep fc12 |awk '{print $1}’|tr ’\n’ ’ ’ >downgrade

yum downgrade `cat downgrade`

EncFS – Simple article to use Encrypted filesystem in Linux

2009-12-24 3 min read Linux

A nice article here

EncFS is an easy-to-use, command-line tool for storing information in encrypted form. It’s not really a file-system, but it pretends to be one at the CLI. If you’ve been searching for a means of encrypting and decrypting your sensitive data easily, here it is.
User Level: Intermediate
EncFS is included with the distribution I’m using on the desktop, Ubuntu Dapper, so all I needed to do to install it was a few clicks in Synaptic. Look for the encfs package, and select if for installation. It should pull down all of the dependencies for the system. If you’re not so lucky, and your distro doesn’t include EncFS packages, you can download the latest tarball from a here and build it from the source. See the EncFS site for a dependencies.

Continue reading

Ubuntu Tips – Boot Faster

2009-12-24 1 min read Linux

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

Ubuntu Tips – Boot Faster LinuxLinks: &#8221;With just a few modifications and some experimentation, your Ubuntu box can realise its untapped potential. We have identified 8 tips to help you achieve this. Most of the tips are really easy to implement, and are perfectly safe.&#8221;

URL: <a href="http://linuxtoday.com/news_story.php3?ltsn=2009-10-01-018-35-OS-HL-UB">http://linuxtoday.com/news_story.php3?ltsn=2009-10-01-018-35-OS-HL-UB

Finding all numbers that are bigger than 1 in vim

2009-12-24 1 min read Fedora Linux Vim Tips

/^([2-9]d*|1d+)
If we have a csv like structure

The trick here is simple, lets look at the regex from the begining:

^ – start from the begining
() – start and end of block
[] – digits within this. So we are looking from 2 to 9 to exclude the numbers begining with 1
d – search for digits

  • – search for one or more
    | – or operation
    1 – search for numbers begining with 1
  • – containing atleast one occurence or more.<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://sparksspace.blogspot.com/2009/10/adding-leading-zeros-in-excel.html">Adding Leading Zeros in Excel (sparksspace.blogspot.com)
  • <li class="zemanta-article-ul-li"><a href="http://blog.creativethink.com/2009/11/the-best-thing-about-2010.html">The Best Thing About &#8221;2010&#8221; (creativethink.com) <li class="zemanta-article-ul-li"><a href="http://www.revenews.com/jackbusch/google-goggles-the-world-is-your-hyperlink/">Google Goggles: The World is Your Hyperlink (revenews.com)
<div class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/e022d83e-669e-4cad-894c-cdab54a1946c/" title="Reblog this post [with Zemanta]"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e34.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">

Initialization or clearing of log files

2009-12-22 1 min read Linux

Like all Unix file systems, open log files can cause a real problem when they get too large and need to be deleted. The problem is, if you delete an open file, the link is removed, but all of the inodes are lost. Even worse, if the program continues to log to the file, the link never re-appears, and additional inodes are lost and are unrecoverable. I suggest two solutions to the above problems.

Continue reading

7 Examples for Sed Hold and Pattern Buffer Operations

2009-12-22 0 min read Linux
\"View\"\"More\"Tags\"\"Comments\"\"Share\"\"Send\"\"Favorite\"\"Twitter\"\"Facebook\"

<a href="http://www.flickr.com/photos/35237104750@N01/259102613"><img id="kwiclick-temp-0" title="txt e-book" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/259102613_bd9628c791_m.jpg" alt="txt e-book" />

<dd class="wp-caption-dd zemanta-img-attribution">Image by <a href="http://www.flickr.com/photos/35237104750@N01/259102613">pqs via Flickr

Continue reading

Change information for the user on Linux machine.

2009-12-19 1 min read Linux

Today I have couple of hours to spare and thus thought might as well spend it on my blog. The finger command in *nix systems is used to display the information on the users. This information is taken from the /etc/passwd file. You can use the chfn command to change the information. Man page for <a href="http://amit.themafia.info/phpMan.php?parameter=chfn&mode=man" target="_blank">chfn.

Older posts Newer posts