Patti (whipartist) wrote,
Patti
whipartist

Linux puzzler answer

A few of you got yesterday's linux puzzler right.

In one window, I did the following:

mv bat bat1
mkdir bat
(recreate the contents of bat from a different source)


I'd done this a few days before, so it wasn't fresh in my memory. This left one window being in bat and the other one being in bat1, but pwd still thought I was in bat. (And I didn't know about /bin/pwd... thanks!)

Once I figured it out it made perfect sense, but I was seriously scratching my head for a few minutes. The one thing I didn't know is that the shell-builtin pwd didn't do a dynamic check to see where it was, but rather just remembered.

The two directories were actually copies of the source tree that I'd checked out of svn, and I was trying to figure out how in the hell I had two different branches in the same directory.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 6 comments