差异:文本文件权限被拒绝 [英] diff: text file permission denied

查看:113
本文介绍了差异:文本文件权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows和使用差异比较两个文本文件。它是成功合作对于小文件,但是,当我开始比较2GB的文件与另一个文件2GB它为我:

I am on Windows and using diff to compare two text files. It was working successfully for small files but, when I start comparing 2GB file with another 2GB file it shows me:

diff: C:/inetpub/wwwroot/webclient/database_sequences/est_mouse_2.txt: Permission denied

我的code:

$OldDatabaseFile = "est_mouse_1";
$NewDatabaseFile = "est_mouse_2";
shell_exec("C:\\cygwin64\\bin\\bash.exe --login -c 'diff $text_files_path/$OldDatabaseFile.txt $text_files_path/$NewDatabaseFile.txt >  $text_files_path/TempDiff_$OldDatabaseFile$NewDatabaseFile.txt 2>&1'");

est_mouse_1.txt est_mouse_2.txt 都是由我创造,我检查文件权限和文件夹的权限,它是完全控制。和我相比,所有的文本文件在同一文件夹中,他们成功地进行比较。

est_mouse_1.txt and est_mouse_2.txt are created by me and I check file permission and folder permission, it is full control. And all other text files which I compared are in the same folder and they were successfully compared.

任何想法?

推荐答案

您正在使用该操作Cygwin的,Cygwin的堆是可扩展的。但是,它在一个固定的大小开始并试图延长它可能碰上存储器,它已经由Windows pviously分配$ P $。
堆内存可以被分配到在处理虚拟内存(​​VM)的最大可用空闲块的大小。在64位系统中,这导致了4GB的虚拟机的过程与执行开始。我想,为什么你不能比较两个2 GB的文件,我同意错误pretty奇怪,但解释说,你对内存的访问受到限制。请参阅的更多信息 cygwin的用户指南

You are using cygwin for this operation, Cygwin's heap is extensible. However, it does start out at a fixed size and attempts to extend it may run into memory which has been previously allocated by Windows. Heap memory can be allocated up to the size of the biggest available free block in the processes virtual memory (VM). On 64 bit systems this results in a 4GB VM for a process started from that executable. I think that why you can't compare two 2GB files, I agree that the error pretty strange but explains that your access to the memory is limited. Please see cygwin user guide for the more info.

这篇关于差异:文本文件权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆