如何在Windows上读取大文本文件?

发布于 2024-07-19 15:09:28 字数 1542 浏览 2 评论 0 原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

π浅易 2024-07-26 15:09:28

试试这个...

大型文本文件查看器

顺便说一句,它是免费的:)

但是,我认为您应该在 serverfault.com 上提问

try this...

Large Text File Viewer

By the way, it is free :)

But, I think you should ask this on serverfault.com instead

魔法少女 2024-07-26 15:09:28

如果你需要的只是一个阅读工具,那么这个东西会立即打开文件 http://www.readfileonline .com/

If all you need is a tool for reading, then this thing will open the file instantly http://www.readfileonline.com/

海夕 2024-07-26 15:09:28

使用EmEditor,很好用,我用它打开了500MB以上的文件

use EmEditor, it's pretty good, i used it to open a file with more than 500mb

ま柒月 2024-07-26 15:09:28

Total Commander 集成的 Text-Viewer 可以打开大文件(>10GB)观看时没有任何问题。 它还提供不同的视图,例如十六进制视图。

The integrated Text-Viewer of Total Commander can open huge files (>10GB) for viewing without any problems. It also provides different views, e.g. a Hex-View.

诺曦 2024-07-26 15:09:28

绝对是EditPad Lite

它不仅在打开文件时速度非常快,而且“全部替换”、修剪前导/尾随空格或将内容转换为小写等功能也非常快。

它也与 Notepad++ 非常相似;)

Definitely EditPad Lite !

It's extremely fast not just while opening files, but also functions like "Replace All", trimming of leading/trailing whitespaces or converting content to lowercase are very fast.

And it is also very similar to Notepad++ ;)

烈酒灼喉 2024-07-26 15:09:28

我已经使用 BareTail 来查看大型日志(一些 GB)一段时间了,它正在工作很好非常快。 有免费版本和商业专业版本。

他们它有

  • 实时文件
  • 优化的实时查看引擎查看任何大小的文件 (> 2GB)
  • 立即滚动到整个文件中的任意点
  • 通过网络查看文件
  • 可配置换行
  • 可配置 TAB 扩展
  • 可配置字体,包括间距和偏移量,以最大限度地利用屏幕空间

另一种选择是 < a href="http://www.farmanager.com/" rel="noreferrer">远经理。 查看几个 GB 的文件没有问题(内存占用很少),但尝试在编辑模式下打开文本文件可能需要几个 GB 的 RAM,因此请注意这一点。 我不知道可以在 Far 中查看/编辑的文件大小限制。

I have been using the BareTail for quite some time for viewing large logs (some GBs) and it is working very well is very fast. There is a free version and a commercial Pro version.

They say that it has

  • Real-time file
  • Optimised real-time viewing engine View files of any size (> 2GB)
  • Scroll to any point in the whole file instantly
  • View files over a network
  • Configurable line wrapping
  • Configurable TAB expansion
  • Configurable font, including spacing and offset to maximise use of screen space

Another alternative is Far Manager. Viewing a several GBs file is no problem (little memory footprint), but attempting to open the text file in the Editing mode might take several GBs of RAM, so be aware of that. I am not aware of the file size limit that can be viewed/edited in Far.

原来分手还会想你 2024-07-26 15:09:28

我讨厌推销自己的东西(好吧,不是真的),但是 PowerPad 可以打开非常大的文件。

否则,我会推荐一个十六进制编辑器。

I hate to promote my own stuff (well, not really), but PowerPad can open very large files.

Otherwise, I'd recommend a hex editor.

梦回旧景 2024-07-26 15:09:28

如果您会编码,请编写一个控制台应用程序。 这是与您所追求的等效的 C# 。
您可以对结果执行您想要的操作(拆分、执行等):

SqlCommand command = null;
try
{
    using (var connection = new SqlConnection("XXXX"))
    {
        command = new SqlCommand();
        command.Connection = connection;
        if (command.Connection.State == ConnectionState.Closed) command.Connection.Open();
        // Create an instance of StreamReader to read from a file.
        // The using statement also closes the StreamReader.
        using (StreamReader sr = new StreamReader("C:\\test.txt"))
        {
            String line;
            // Read and display lines from the file until the end of 
            // the file is reached.
            while ((line = sr.ReadLine()) != null)
            {
                Console.WriteLine(line);
                command.CommandText = line;
                command.ExecuteNonQuery();
                Console.Write(" - DONE");
            }
        }
    }
}
catch (Exception e)
{
    // Let the user know what went wrong.
    Console.WriteLine("The file could not be read:");
    Console.WriteLine(e.Message);
}
finally
{
    if (command.Connection.State == ConnectionState.Open) command.Connection.Close();
}

if you can code, write a console app. here is the c# equivalent of what you're after.
you can do what you want with the results (split, execute etc):

SqlCommand command = null;
try
{
    using (var connection = new SqlConnection("XXXX"))
    {
        command = new SqlCommand();
        command.Connection = connection;
        if (command.Connection.State == ConnectionState.Closed) command.Connection.Open();
        // Create an instance of StreamReader to read from a file.
        // The using statement also closes the StreamReader.
        using (StreamReader sr = new StreamReader("C:\\test.txt"))
        {
            String line;
            // Read and display lines from the file until the end of 
            // the file is reached.
            while ((line = sr.ReadLine()) != null)
            {
                Console.WriteLine(line);
                command.CommandText = line;
                command.ExecuteNonQuery();
                Console.Write(" - DONE");
            }
        }
    }
}
catch (Exception e)
{
    // Let the user know what went wrong.
    Console.WriteLine("The file could not be read:");
    Console.WriteLine(e.Message);
}
finally
{
    if (command.Connection.State == ConnectionState.Open) command.Connection.Close();
}
南…巷孤猫 2024-07-26 15:09:28

我只是在 Cygwin 之上使用 less 来读取 3GB 文件,尽管我最终使用 grep 来查找我需要的内容。

less更多,但更好。)

有关 less 的更多详细信息,请参阅此答案:https://stackoverflow.com/a/1343576/1005039

I just used less on top of Cygwin to read a 3GB file, though I ended up using grep to find what I needed in it.

(less is more, but better.)

See this answer for more details on less: https://stackoverflow.com/a/1343576/1005039

も星光 2024-07-26 15:09:28

虽然大文本文件查看器非常适合查看大文件(并且是免费的!),但如果该文件是分隔文件或固定宽度文件,那么您应该查看 文件查询。 它不仅可以打开任何大小的文件(我个人打开过一个 280GB 的文件,但它可以更大),而且它还可以让您像在数据库中一样查询该文件,找出您想要的任何类型的信息。可能想要从中得到。

不过它不是免费的,因此它更适合经常处理大文件的人,但如果您遇到一次性问题,您可以免费使用 30 天试用版。

While Large Text File Viewer works great for just looking at a large file (and is free!), if the file is either a delimited or fixed-width file, then you should check out File Query. Not only can it open a file of any size (I have personally opened a 280GB file, but it can go larger), but it lets you query the file as though it was in a database as well, finding out any sort of information you could want from it.

It is not free though, so it is more for people that work with large files a lot, but if you have a one-off problem, you can just use the 30-day trial for free.

久夏青 2024-07-26 15:09:28

您应该尝试 TextPad,它可以读取该大小的文件。

免费评估(可以无限期评估)

You should try TextPad, it can read a file of that size.

It's free to evaluate (you can evaluate indefinitely)

萤火眠眠 2024-07-26 15:09:28

Windows 版的 GnuUtils 也让这一切变得简单。 该包中包含标准 UNIX 实用程序,例如 cat、ls 等。 我正在使用 cat 文件名 | 更多的内容是翻阅一个Notepad++根本无法打开的大文件。

GnuUtils for Windows make this easy as well. In that package are standard UNIX utils like cat, ls and more. I am using cat filename | more to page through a huge file that Notepad++ can't open at all.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文