I was editing some files in a subdirectory of a project (which itself is a
subdirectory of a directory named "projects"). After concluding this edit
I decided I wanted to have the option to revert my changes. Since this is
not being doing in a revision management system, and instead I have backups
of different versions, I decided to do the following steps:
1. In a shell session that was not involved in previous edits, I changed
to the "projects" directory.
2. I renamed the directory for the project to bump the version number.
These directory names have the version number appended. Now I have a
"hole" in the directory names.
3. I used rsync to copy the original directory name from a backup, thus
filling in the "hole" with the old contents.
Eight total shell sessions were in various subdirectories of the project,
including the one I did the editing in. What I expected to happen, and what
normally happens, is that the current directory of these shell sessions stays
with the actual directory inode. So when I do the command "pwd" I expect to
now be in a subdirectory of the renamed project directory. For most of the
shell sessions that was the case. However, in two of the shell session this
was NOT the case. These shell sessions still show as being in the old name.
These two were NOT involved in doing any editing. What I did in these two
shell sessions was "ld -Al" giving the name of the subdirectory that edited
files were in, prefixed with "../". In the shell sessions that did have the
expected (bumped) directory name, this command showed the expected files as
having been edited. But, in the two shell sessions that did not have the
expected directory name, at least they were consistent and showed the files
that were edited, in their original (before editing) dates and sizes.
I am assuming that somehow these two shell sessions changed directory and are
now in the equivalent directory of the directories retrieved from the backup
via rsync.
The shell in all cases is BASH version 3.1.17.
The Linux kernel is 2.6.26.2 which I compiled with gcc 4.1.2.
The filesystem is ReiserFS.
The machine is i686 Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel
Is this some weird artifact of the shell that can just sometimes happen?
Do I have some kernel corruption (this machine does not have ECC memory)?
Do I have file system corruption?
Any idea what happened?
--
--------------------------------------------------------------------------- --
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
--------------------------------------------------------------------------- --