console showing old content after folder renamed in other console

Bug #503443 reported by florin oltean
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash (Ubuntu)

Bug Description

I will start by saying that I am using Ubuntu9.10.
The bug is related to the console and renaming the directory that one of the console is in.

For example:
I have 2 consoles open.
In console number 1 I do:

cd /home/florin
mkdir dir1
cd dir1
joe file000

In console number 2 I do:

cd /home/florin
mv dir1 dir2

Now in console 1 "pwd" will show the old path:
pwd # => /home/florin/dir1 and not the correct one: /home/florin/dir2

Also "ls" will show the content
ls # => file000

Even worst:
In console 2 I create a new directory dir1 with a new file named "file000", but a new content,
console 1 will still show the content of the old "file000"

Revision history for this message
florin oltean (oltean-florin-ioan) wrote :

I would like to specify that by "console" I understand a "terminal" started from "Applications->Accessories->Terminal". So there are no confusions.

Revision history for this message
Will Bickerstaff (willbickerstaff) wrote :

Even more confusing is that if you then create a file in in terminal 1 while still apparently working in the old non-existent dir, it then appears in terminal 2 in the newly re-located dir, So bash clearly knows where we really are it's just not updating the prompt. This also happens in VTs so I'm guessing it's a bash issue rather than one with gnome-terminal.

Revision history for this message
Will Bickerstaff (willbickerstaff) wrote :

So this looks like it's intended behaviour, to improve performance. The bug is already reported at, and if it really is an issue, then there a couple of workarounds in the response.

affects: ubuntu → bash (Ubuntu)
Changed in bash (Ubuntu):
status: New → Confirmed
Revision history for this message
Will Bickerstaff (willbickerstaff) wrote :

Once I run pwd -P, /bin/pwd or env pwd wouldn't it be reasonable for environment variable $PWD to be refreshed?

Revision history for this message
Will Bickerstaff (willbickerstaff) wrote :

No it wouldn't just been pointed here, which explains why it's the way it is

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.