Web lists-archives.com

copying "file.exe" + "file" (a shell script) => targetdir fails




I know *why* this is happening (cygwin treating x.exe as x), but
should it do it for shell files too?

sourcedir:
 ll -di bin/updatedb bin/updatedb.exe
337488497076088359 -rwxrwxr-x+ 1  10163 Apr 12 17:07 bin/updatedb*
144115188075956844 -rwxrwxr-x+ 2 287813 Apr 15  2014 bin/updatedb.exe*
(two different files, different types:)
 file bin/updatedb{,.exe}
bin/updatedb:     Bourne-Again shell script, ASCII text executable
bin/updatedb.exe: PE32+ executable (console) x86-64, for MS Windows


 cp -l bin/updatedb /nbin/
cp: cannot create hard link '/nbin/updatedb' to 'bin/updatedb': File exists

cp thinks /nbin/updatedb is the same as /nbin/updatedb.exe (and prevents
copying a real 'updatedb' script into the same place:

(target):
 ll -i /nbin/updatedb.exe /nbin/updatedb
144115188075956844 -rwxrwxr-x+ 2 287813 Apr 15  2014 /nbin/updatedb*
144115188075956844 -rwxrwxr-x+ 2 287813 Apr 15  2014 /nbin/updatedb.exe*

But I can create a dir named /nbin/updatedb:

 mkdir /nbin/updatedb

And now have 2 different inodes in target:

 ll -di bin/updatedb bin/updatedb.exe
337488497076088359 -rwxrwxr-x+ 1  10163 Apr 12 17:07 bin/updatedb*
144115188075956844 -rwxrwxr-x+ 2 287813 Apr 15  2014 bin/updatedb.exe*

------------

Is this suppose to work this way?

(I know how to work around this (used move in cmd.exe),
but why can I create a dir but not a file there?

A bit strange -- guess it isn't often I have both a "file"
and "file.exe" in a dir.

-linda







--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple