Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 哪些NTFS属性可以阻止Cygwin在目录中列出文件?_Windows_Filesystems_Cygwin_Ntfs - Fatal编程技术网

Windows 哪些NTFS属性可以阻止Cygwin在目录中列出文件?

Windows 哪些NTFS属性可以阻止Cygwin在目录中列出文件?,windows,filesystems,cygwin,ntfs,Windows,Filesystems,Cygwin,Ntfs,我对以下情况感到困惑。似乎我有一个文件,在所有Windows工具中看起来都很正常,但在Cygwin的任何目录列表中都没有。但是,如果显式命名,它是可访问的。注意: $ ls -lA total 0 $ ls -lA magic.pdf -rwxrwx---+ 1 Konstantin None 1647075 Oct 11 2017 magic.pdf $ /cygdrive/c/Windows/System32/cmd /C dir Volume in drive G is Toshi

我对以下情况感到困惑。似乎我有一个文件,在所有Windows工具中看起来都很正常,但在Cygwin的任何目录列表中都没有。但是,如果显式命名,它是可访问的。注意:

$ ls -lA
total 0

$ ls -lA magic.pdf
-rwxrwx---+ 1 Konstantin None 1647075 Oct 11  2017 magic.pdf

$ /cygdrive/c/Windows/System32/cmd /C dir
 Volume in drive G is Toshiba Backup
 Volume Serial Number is E692-2E8C

 Directory of G:\test

20/04/2018  11:49    <DIR>          .
20/04/2018  11:49    <DIR>          ..
11/10/2017  19:00         1.647.075 magic.pdf
               1 File(s)      1.647.075 bytes
               2 Dir(s)  483.796.258.816 bytes free
然而,这无助于:

$ touch magic.pdf
$ ls -lA
total 1612
-rwxrwx---+ 1 Konstantin None 1647075 Apr 20 11:50 magic2.pdf
我可以在各种硬盘上移动文件。只要它们是NTFS,它就不可见。移动到FAT32会使文件可见,因此它似乎与NTFS文件属性有某种关联

将“不可见”文件的属性与其cygwin可见副本进行比较,我可以看到前者在其属性对话框中有一个注释:“此文件来自另一台计算机,可能会被阻止以帮助保护此计算机”。 如果我选中“unblock”复选框,消息将消失,但Cygwin仍然无法看到该文件

有人能给我解释一下发生了什么,我怎么能强迫Cygwin看到所有的文件(当你通过rsync备份一个目录,然后发现不是所有的文件都被传输了,这有点令人沮丧)


Cygwin64,最新版本,安装在Windows 10 Pro上,以管理员身份启动。

当前cygwin dll 2.10.0在处理带有
临时属性的文件和目录时存在错误。
这是一个模糊的文件属性,在
ATTRIB
命令中不可见 也不在资源管理器文件属性上。 这些文件通常由第三方程序生成,而不是由cygwin程序生成

开发源上的错误是正确的

最新的快照可以正确地处理它们,并且具有此类属性的文件对cygwin程序可见

据韩国电信报道

PowerShell代码段“取消隐藏”文件:(Get Item m.pdf).attributes= 0,而下面的-将其隐藏:(Get Item m.pdf).attributes= 0x100。奇怪的是,似乎没有任何其他内置(GUI或 CLI)查看或更改“临时”属性的方法


Power shell可以修改
临时属性。

运行
attrib.exe magic.pdf
检查NTFS文件属性。同时选中
cmd/c dir/r magic.pdf
以显示备用数据流。
attrib.exe
仅显示
A
属性-与“可见”副本没有任何区别。
dir/r
确实显示了另一个名为
magic.pdf:Zone.Identifier:$DATA
的流,该流包含26个字节(我想这就是存储“从Internet下载”标志的位置)。当我选中“属性”对话框中的“取消阻止”复选框时,流将消失,但是该文件在Cygwin中仍然不可见。可能
ls
正在使用扩展属性。试试
getfattr-d-m.*'magic.pdf
。这可能需要安装一个“attr”软件包。一般的操作系统问题并不在这里。您可能在superuser.com或unix.stackexchange.com上运气更好。可能是这个问题
$ cp magic.pdf magic2.pdf
$ ls -lA
total 1612
-rwxrwx---+ 1 Konstantin None 1647075 Apr 20 11:50 magic2.pdf
$ touch magic.pdf
$ ls -lA
total 1612
-rwxrwx---+ 1 Konstantin None 1647075 Apr 20 11:50 magic2.pdf