Sunday, March 20, 2011

Toggling through the directory hierarchy

I recently came across pushd and popd commands and found them to be of great help. I use command line to do a most of my work, while I am working there are lot of time's when I move deep into the directory hierarchy and then return to the directory I was previously working in. This is sometime's  tiring and time consuming. If you are one of them and don't know about the pushd and popd command's then you are at the right place. Let me explain it with an example -

       $ pwd
       /home/linux_code

Now you wish to look at the code which might be under fs/minix and then later want to come back to the current directory then first push the current directory to the stack (that is what I think pushd stands for -push directory). It takes an argument (the directory to be saved/pushed).

      $pushd .
      $cd fs/minix

Once you are done with the work just use the popd command to return to the previously saved direcotory. 

      $popd
      $pwd
      /home/linux_code

Also note that, if you start pushing more than one directory on to the stack, then it will be popped in the reverse order (since stack follows Last In First Out (LIFO) order). So start using.

Friday, February 18, 2011

Hello World

Hello Folks,

This Junaid. I am working as a software engineer. I am new to this blogging world and  have been thinking of writing a blog for quite some time now. The questions that I had in my mind was when there are hundreds of blogs on the net that speak on almost every topic then what is the need of one more blog. A simple answer to it is that it will help me document my work and if it helps any one else then its an added point.

So here I am with my first post , being a software engineer's, many of you must have observed that "HELLO WORLD" is the very first program that every programming language book teaches us to write. Thus, I thought why not start my blog with the title "hello world".

I am an admirer of open-source philosophy and a linux user by choice. In this blog I 'll be speaking about linux, emerging technologies, open source tools, file system and many more things. So, folks do follow up regularly and do write your valuable comments.