I've a Debian dist, Kernel 2.2.17, no patches, all packages are stable.
here what I found:
[/tmp] mkdir old
[/tmp] chdir old
[/tmp/old] mv . ../new
[/tmp/old] (should be /tmp/new !!)
[/tmp/old] mkdir fff
error: cannot write...
[tmp/old] ls > fff
error: cannot write...
[/tmp/old] ls -la
total 0 (?)
[/tmp/old] cd ..
[/tmp] ls -la
***************** ./
***************** ../
***************** new/
Does anybody knew this bug?
On Thu, Nov 09, 2000 at 05:20:22PM +0200, Andrea Pintori wrote:
> [/tmp/old] mv . ../new
> [/tmp/old] (should be /tmp/new !!)
You forgot to 'cd .'
Tim.
*/
Tim Waugh wrote:
> You forgot to 'cd .'
Look for "pebsak" messages in /var/log/syslog
;)
On Thu, Nov 09, 2000 at 05:20:22PM +0200,
Andrea Pintori <[email protected]> wrote:
>
> I've a Debian dist, Kernel 2.2.17, no patches, all packages are stable.
I've Debian unstable, Kernel 2.2.17
> here what I found:
>
> [/tmp] mkdir old
> [/tmp] chdir old
> [/tmp/old] mv . ../new
> [/tmp/old] (should be /tmp/new !!)
Uhm, no. $PWD only gets updated on cd, not on mv. Thus, the old value is
OK!
> [/tmp/old] mkdir fff
> error: cannot write...
> [tmp/old] ls > fff
> error: cannot write...
This seems wrong. But I'd rather say this is a bug in your shell, not in
the kernel!
/tmp> mkdir old
/tmp> cd old
/tmp/old> mv . ../new
/tmp/old> mkdir fff
/tmp/old> ls -al
total 12
drwxr-xr-x 3 jean-luc jean-luc 4096 Nov 9 16:46 .
drwxrwxrwt 8 root root 4096 Nov 9 16:46 ..
drwxr-xr-x 2 jean-luc jean-luc 4096 Nov 9 16:46 fff
/tmp/old> cd ../new
/tmp/new> ls -al
total 12
drwxr-xr-x 3 jean-luc jean-luc 4096 Nov 9 16:46 .
drwxrwxrwt 8 root root 4096 Nov 9 16:46 ..
drwxr-xr-x 2 jean-luc jean-luc 4096 Nov 9 16:46 fff
Works for both bash-2.04 and zsh-3.1.9-dev7 (as in Debian unstable).
> Does anybody knew this bug?
Well, I can't even reproduce it ;)
Ciao,
Thomas
--
Thomas K?hler Email: [email protected] | LCARS - Linux
<>< WWW: http://jeanluc-picard.de | for Computers
IRC: jeanluc | on All Real
PGP public key available from Homepage! | Starships
On Thu, 9 Nov 2000, Andrea Pintori wrote:
> I've a Debian dist, Kernel 2.2.17, no patches, all packages are stable.
>
> here what I found:
>
> [/tmp] mkdir old
> [/tmp] chdir old
> [/tmp/old] mv . ../new
> [/tmp/old] (should be /tmp/new !!)
The shell might not read this all the while so the name you see
may not change until you change directory.
> [/tmp/old] mkdir fff
> error: cannot write...
This should not happen and it doesn't happen in kernel version 2.4.0-test0
> [tmp/old] ls > fff
> error: cannot write...
> [/tmp/old] ls -la
> total 0 (?)
> [/tmp/old] cd ..
> [/tmp] ls -la
> ***************** ./
> ***************** ../
> ***************** new/
>
Script started on Thu Nov 9 10:45:35 2000
# pwd
/tmp
# mkdir old
# cd old
# pwd
/tmp/old
# mv ../old ../new
# pwd
/tmp/old The shell hasn't re-read the current directory
# ls
# >foo Make a file called foo
# ls
foo It's there okay
# rm foo Remove the file
# mkdir bar Make a directory
# ls
bar It's there
# cd bar
# pwd
/tmp/new/bar Now, the shell re-read the directory, it is correct
# cd ..
# pwd
/tmp/new Back where we were, shell reads correct directory.
# cd ..
# ls
new typescript
# rm -r new
# exit
exit
Script done on Thu Nov 9 10:47:23 2000
Cheers,
Dick Johnson
Penguin : Linux version 2.4.0 on an i686 machine (799.54 BogoMips).
"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.
On Thu, Nov 09, 2000 at 05:20:22PM +0200, Andrea Pintori wrote:
> I've a Debian dist, Kernel 2.2.17, no patches, all packages are stable.
>
> here what I found:
>
> [/tmp] mkdir old
> [/tmp] chdir old
> [/tmp/old] mv . ../new
> [/tmp/old] (should be /tmp/new !!)
> [/tmp/old] mkdir fff
> error: cannot write...
> [tmp/old] ls > fff
> error: cannot write...
> [/tmp/old] ls -la
> total 0 (?)
> [/tmp/old] cd ..
> [/tmp] ls -la
> ***************** ./
> ***************** ../
> ***************** new/
>
> Does anybody knew this bug?
Not a bug... possibly a typo though. The "[/tmp/old] mv . ../new" line
destroys the definition of "current directory". The "mkdir fff" can't work
since the current directory is no longer there, and is indicated by
the lines:
[/tmp/old] ls -la
total 0 (?)
There is nothing to take a directory of.
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: [email protected]
Any opinions expressed are solely my own.
On Thu, 09 Nov 2000 16:20:22 Andrea Pintori wrote:
> I've a Debian dist, Kernel 2.2.17, no patches, all packages are stable.
>
> here what I found:
>
> [/tmp] mkdir old
> [/tmp] chdir old
> [/tmp/old] mv . ../new
> [/tmp/old] (should be /tmp/new !!)
No, bash cwd is still "/tmp/old".
> [/tmp/old] mkdir fff
> error: cannot write...
> [tmp/old] ls > fff
> error: cannot write...
> [/tmp/old] ls -la
> total 0 (?)
Right, "/tmp/old" does not exist, so nothing can be done with it.
> [/tmp/old] cd ..
> [/tmp] ls -la
> ***************** ./
> ***************** ../
> ***************** new/
>
> Does anybody knew this bug?
Is not a bug, I have also seen that int SGI IRIX. Try it in an NFS mounted
disk. I don't remember exactly, but even you can ls it. Things on file
system caches and so on...
--
Juan Antonio Magallon Lacarta #> cd /pub
mailto:[email protected] #> more beer