我在Windows 7上无法编辑此文件:
C:\Program Files (x86)\CMake 2.8.7\share\cmake-2.8\Modules\FindJNI.cmake
如果我在Cygwin(vi)或TextPad中对其进行编辑,则这两个程序会看到更改,因此它将被写入磁盘中的某个位置。但是,如果我在DOS cmd shell中“键入”文件,则看起来该文件根本没有更改。
我注意到的一件事是,在cmd shell中,所有者是Administrators,而在Cygwin的bash shell中,所有者是Dan:
C:\Program Files (x86)\CMake 2.8.7\share\cmake-2.8\Modules>dir /Q FindJ*
Volume in drive C is Windows7_OS
Volume Serial Number is 92CA-8707
Directory of C:\Program Files (x86)\CMake 2.8.7\share\cmake-2.8\Modules
12/30/2011 09:45 AM 1,480 BUILTIN\Administrators FindJasper.cmake
12/30/2011 09:45 AM 7,951 BUILTIN\Administrators FindJava.cmake
12/30/2011 09:45 AM 10,632 BUILTIN\Administrators FindJNI.cmake
12/30/2011 09:45 AM 1,669 BUILTIN\Administrators FindJPEG.cmake
4 File(s) 21,732 bytes
0 Dir(s) 132,524,654,592 bytes free
Dan@home /c/Program Files (x86)/CMake 2.8.7/share/cmake-2.8/Modules
$ ls -al FindJ*
-rwx------+ 1 Dan None 10636 Jan 30 13:57 FindJNI.cmake
-rwx------+ 1 Administrators None 1669 Dec 30 09:45 FindJPEG.cmake
-rwx------+ 1 Administrators None 1480 Dec 30 09:45 FindJasper.cmake
-rwx------+ 1 Administrators None 7951 Dec 30 09:45 FindJava.cmake
怎么会这样?就像在同一目录中有两个具有相同名称的不同文件一样。