Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emacs To read Large Files ~14GB [closed]

Tags:

file

linux

emacs

Recently I have downloaded emacs on my system to edit large files as it claims. When trying opening large files, the emacs gives me a problem that buffer size is exceeded.

Is there a way to increase it?! I have a system with memory of 24 GB!

like image 650
Mohamad Ibrahim Avatar asked Dec 02 '11 08:12

Mohamad Ibrahim


People also ask

Can Emacs handle large files?

Emacs compiled on a 64-bit machine can handle much larger buffers; up to most-positive-fixnum (2.3 exabytes). Due to things like decoding of multibyte characters, you can only visit files with a size that is roughly half the buffer size limit.

How do I open a 1gb text file?

Solution 1: Download a Dedicated Large File Viewer If all you need to do is read the large file, you can download a dedicated large file viewer such as the Large Text File Viewer. Such tools will open large text files with ease.


2 Answers

I've never used it but vlf.el is an elisp hack to view overly large files. I believe it uses insert-file-contents, but reads from an offset so as to do something akin to pagination.

There are some notes on the wiki but no solutions apart from vlf.el which I've linked to above.

like image 182
Noufal Ibrahim Avatar answered Oct 06 '22 09:10

Noufal Ibrahim


Type M-:(log most-positive-fixnum 2) to see whether the return value is closer to 64 or 32. If the latter, compile or get yourself a 64-bit Emacs. Also look at M-x find-file-literally if large files cause sluggishness; it should disable some time consuming operations such as font-lock-mode.

like image 25
huaiyuan Avatar answered Oct 06 '22 08:10

huaiyuan