Nice programing

Windows에서 큰 텍스트 파일을 읽는 방법은 무엇입니까?

nicepro 2020. 10. 19. 12:45
반응형

Windows에서 큰 텍스트 파일을 읽는 방법은 무엇입니까?


메모장이나 메모장 ++로 열 수없는 대용량 서버 로그 파일 (~ 750MB)이 있습니다 (둘 다 파일이 너무 크다고 말합니다).

한 번에 파일의 작은 부분 만 메모리로 읽는 프로그램 (Windows 용)을 제안 할 수 있습니까?

아니면이 파일을 구문 분석하려면 내 앱을 작성해야합니까?


이 시도...

큰 텍스트 파일 뷰어

그건 그렇고, 그것은 무료입니다 :)

하지만 대신 serverfault.com 에서이 질문을해야한다고 생각합니다.


읽기 도구 만 있으면 바로 파일이 열립니다. http://www.readfileonline.com/


사용 엠 에디터는 , 꽤 좋은, 내가 더 5백메가바이트 이상으로 파일을 열 때 그것을 사용되는


Total Commander 의 통합 텍스트 뷰어큰 파일 (> 10GB)을 열어 문제없이 볼 수 있습니다. 또한 Hex-View와 같은 다양한보기를 제공합니다.


확실히 EditPad Lite !

파일을 여는 동안뿐만 아니라 "모두 바꾸기"와 같은 기능, 선행 / 후행 공백 자르기 또는 콘텐츠를 소문자로 변환하는 기능도 매우 빠릅니다.

또한 Notepad ++ 와 매우 유사합니다 .)


큰 로그 (일부 GB)를보기 위해 BareTail 을 꽤 오랫동안 사용해 왔으며 매우 잘 작동하고 있습니다. 무료 버전과 상용 Pro 버전이 있습니다.

그들은 그것이 있다고 말한다

  • 실시간 파일
  • 최적화 된 실시간보기 엔진 모든 크기 (> 2GB)의 파일보기
  • 전체 파일의 임의 지점으로 즉시 스크롤
  • 네트워크를 통해 파일보기
  • 구성 가능한 줄 바꿈
  • 구성 가능한 TAB 확장
  • 화면 공간 사용을 최대화하기 위해 간격 및 오프셋을 포함하여 구성 가능한 글꼴

또 다른 대안은 Far Manager 입니다. 몇 GB 파일을 보는 것은 문제가되지 않지만 (메모리 사용량이 적음) 편집 모드에서 텍스트 파일을 열려고하면 몇 GB의 RAM이 필요할 수 있으므로주의하십시오. Far에서 보거나 편집 할 수있는 파일 크기 제한을 모릅니다.


UltraEdit가 트릭을 수행합니다 .


난 그냥 사용 less의 상단에 Cygwin에서 내가 사용 결국 불구하고 3기가바이트 파일을 읽고 grep내가 필요한 것을 찾을 수 있습니다.

( less이다 more더 나은,하지만.)

자세한 내용은 다음 답변을 참조하십시오 less: https://stackoverflow.com/a/1343576/1005039


코딩 할 수 있다면 콘솔 앱을 작성하세요. 여기에 당신이 추구하는 것과 동등한 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();
}

나는 내 물건을 홍보하는 것을 싫어하지만 (실제로는 아니지만) PowerPad 는 매우 큰 파일을 열 수 있습니다.

그렇지 않으면 16 진 편집기를 추천합니다.


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.


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.


Try Sublime Text

Takes some time to open the file, but then it is pretty fast.


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

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

참고URL : https://stackoverflow.com/questions/846475/how-to-read-large-text-file-on-windows

반응형