bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mv creates 'immortal' directory trees on samba-mounted NT shares


From: Tim Van Holder
Subject: Re: mv creates 'immortal' directory trees on samba-mounted NT shares
Date: Tue, 17 Oct 2000 12:56:26 GMT
User-agent: Pan/0.9 (Unix)

In a burst of inspiration, "Hans-Bernhard Broeker"
<address@hidden> wrote this on
<address@hidden>:

> Tim Van Holder <address@hidden> wrote:
> [...]
>> This would seem to be some bug in mv, as it fails to detect that source
>> and destination are actually the same file/directory (when fOO is a
>> file, it will truncate it and rename it to foo, then complain with
>> 'Text file busy').
> 
> I don't think 'mv' is guilty of this detection failure. It's the file
> system driver's duty to create a usable illusion of an inode number.
> That's what programs like 'mv' or 'diff' use to determine if two
> filenames refer to the exact same file, eventually: if the device and
> inode number are the same, the file is considered to be the same.
> 
> DOS-borne file systems with their disrespect of letter case in filenames
> make this even more important as there, you can reach even the same
> directory entry, instead of just the same file, under different names,
> i.e. comparisons of filenames don't help, either.
> 
> I think the blame should go to samba or NT, not 'mv', here.
> 
Apparently you're right. It seems samba generates unique inode numbers
for directory entries, but if you use a differently-cased name to refer
to them, a new inode no is generated.

For example:

ls -lid
1234 .....  foo
1235 .....  bar

ls -lid Foo Bar BAR FOO
1556 .....  Foo
1557 .....  Bar
1558 .....  BAR
1559 .....  FOO

--
Tim Van Holder - Falcon Software NV
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Fight spam - go to http://www.politik-digital.de/spam/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]