我的意思是 100+ MB 大;这样的文本文件可以推动编辑的信封。
我需要查看一个大的 XML 文件,但如果编辑器有问题,我就不能。
有什么建议么?
我的意思是 100+ MB 大;这样的文本文件可以推动编辑的信封。
我需要查看一个大的 XML 文件,但如果编辑器有问题,我就不能。
有什么建议么?
免费只读查看器:
tail
)、书签、使用不同颜色突出显示模式,并且内置了严重的优化。但从 UI 的角度来看,它相当小。tail
” 它实际上是一个日志文件分析器,而不是一个大文件查看器,在一次测试中,它需要 10 秒和 700 MB 的 RAM 来加载一个 250 MB 的文件。但它的杀手级功能是分栏器(解析 CSV、JSONL 等格式的日志并以电子表格格式显示)和荧光笔(以特定颜色显示带有特定单词的行)。还支持文件跟踪、选项卡、多文件、书签、搜索、插件和外部工具。免费编辑:
内置程序(无需安装):
MORE
,而不是 Unixmore
。一个控制台程序,允许您一次查看一个屏幕的文件。网络浏览器:
付费编辑/观众:
您为什么使用编辑器来查看(大)文件?
在 *nix 或Cygwin下,只需使用less。(有一句名言——“少即是多,或多或少”——因为“less”取代了早期的 Unix 命令“more”,另外还可以向上滚动。)在 less 下搜索和导航非常类似于Vim,但没有交换文件并且使用的 RAM 很少。
GNU less 有一个 Win32 端口。请参阅上面答案的“更少”部分。
Perl 非常适合快速编写脚本,它的..
(范围触发器)运算符提供了一个很好的选择机制来限制你必须涉足的杂物。
例如:
$ perl -n -e 'print if ( 1000000 .. 2000000)' humongo.txt | less
这将提取从 100 万行到 200 万行的所有内容,并允许您手动筛选输出。
另一个例子:
$ perl -n -e 'print if ( /regex one/ .. /regex two/)' humongo.txt | less
当“正则表达式一”找到某些东西时,它开始打印,并在“正则表达式二”找到有趣块的结尾时停止。它可能会找到多个块。筛选输出...
这是您可以使用的另一个有用的工具。引用维基百科的文章:
logparser是一个灵活的命令行实用程序,最初由 Microsoft 员工 Gabriele Giuseppini 编写,用于自动测试 IIS 日志记录。它旨在与 Windows 操作系统一起使用,并包含在 IIS 6.0 资源工具包工具中。logparser 的默认行为类似于“数据处理管道”,通过在命令行上获取 SQL 表达式,并输出包含 SQL 表达式匹配的行。
Microsoft describes Logparser as a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows operating system such as the Event Log, the Registry, the file system, and Active Directory. The results of the input query can be custom-formatted in text based output, or they can be persisted to more specialty targets like SQL, SYSLOG, or a chart.
Example usage:
C:\>logparser.exe -i:textline -o:tsv "select Index, Text from 'c:\path\to\file.log' where line > 1000 and line < 2000"
C:\>logparser.exe -i:textline -o:tsv "select Index, Text from 'c:\path\to\file.log' where line like '%pattern%'"
100 MB isn't too big. 3 GB is getting kind of big. I used to work at a print & mail facility that created about 2% of U.S. first class mail. One of the systems for which I was the tech lead accounted for about 15+% of the pieces of mail. We had some big files to debug here and there.
随时在此处添加更多工具和信息。这个答案是社区维基是有原因的!我们都需要更多关于处理大量数据的建议......