How to view huge txt files in Linux? [closed]
You can install Midnight Commander.
Debian, Ubuntu, etc.:
apt-get install mc
Red Hat, CentOS, Fedora, etc.:
yum install mc
You can start Midnight Commander from the CLI with the mc
command.After that you may select and open any file in "view mode" (F3) or in "edit mode" (F4).
mc
is much more efficient when opening and browsing large files than vim
. I checked it myself.
If you want to watch a very large file in your favorite editor, without worrying about the limitations associated with RAM, I suggest you split the file using the split
command:
split -n 8 [FILE_NAME]
The above cammand splits the file into 8 parts.
Of course, this solution will only check for some applications. Note that not every file retains its consistency after the division (e.g. XML does not). It all depends on what you want to do with the given file.