Impressions16 Aug 2007 06:57 pm

$ cd `pwd`

Birunko saw I typing this command and asked me: “Are you crazy?”

I believe that the best answer for that question is: “not yet”, because in a single day I used:

  • gcc to compile gcc
  • wget to donwload the wget (source package)
  • find to find the findutils package
  • tar to unzip the tar package

(hmm it remembered me that another day I used apt-get to reinstall apt package that was corrupted)

So, what is the problem about to use the ‘cd’ command to “change” my current directory to my current directory?

ok, let me try to explain that. I was using 2 terminals. In the first one I had OpenEmbedded building Mamona packages and in the second one I was seeing the files generated on work directory. During the build my directory was deleted and recreated by OpenEmbedded, but my second terminal couldn’t know about that. The ‘pwd’ command still returns the full link correctly, but ‘ls’ and other commands tries to access something in memory that doesn’t exist anymore, so ‘cd `pwd`’ command takes me to the right current directory in memory.

But, if you thought that my strange day had a happy end you were wrong, I finished my day finding a bug on a bug tracker.

So the current question that is driving me crazy is: “how can I report a bug tracker bug in a bug tracker that has a blocker bug?

I couldn’t have a better end, could you?

4 Responses to “Estranhando o estranho”

  1. on 17 Aug 2007 at 2:51 am Marius Gedminas

    ‘cd .’ is a shorter spelling and has the same effect.

  2. on 17 Aug 2007 at 4:30 am Fleury

    Haha, the mamonas are making you even crazier than you used to be :)

    That made me remember one day I saw something like “cd `/bin/pwd`” in a script, probably from Yast!

    I took me a while to note the absolute path before “pwd”… and then I realized there’re two “pwd”s, one that a bash function, and another one that’s a standalone binary. And they behave slightly different.

    Try the following:

    cd /usr/src/linux (I’m assuming you have the symlink)
    pwd
    /bin/pwd

    that’s new to me :-)

    Take care!

  3. on 09 Oct 2007 at 12:59 am pancake

    What a recursive day! :D

  4. on 11 Apr 2008 at 4:49 pm estranhando

    [...] anwari. birunko. blog. bug. estranhando. estranho. flors …http://trailfire.com/guide/page/845428/Rodrigo Vivi – vivijim ? Estranhando o estranhocd `pwd` Birunko saw I typing this command and asked me: ???Are you crazy???? I believe that the [...]

Trackback this Post | Feed on comments to this Post

Leave a Reply