Though we were instructed not to, a colleague of mine used vi to view a large text file (server.log 3.5 GB). This filled up /var/tmp and caused some problems on the server.
What caused this? Why shouldn't we use vi for large files?
The default directory (/var/tmp) for the vi editing buffer needs space equal to roughly twice the size of the file with which you are working, because vi uses the extra lines for buffer manipulation.
If the /var/tmp directory does not have enough space for the editing buffer (e.g., you are working with a large file, or the system is running out of space
some times you may get ,you will receive the following error message like this also
You can read about how to fix this here: http://kb.iu.edu/data/akqv.html
Vim was not designed for large files. It has certain features which drastically slow down the user experience. For instance, it loads the file into memory which basically limits to edit files smaller than your memory size. Furthermore, features such as syntax highlighting, swap file and undo are very inefficient with large files and slow thing down even more. Another issue is that
That having said, there are plugins like vim-largefile that change particular settings to be more efficient with large files, but in the end
The bottom line is, don't use
If you want to filter the output use an ampersand:
Then start the continuous output using shift-f. You can exit the continuous output display with ctrl-c and refine or cancel your filter pattern or start a search.
To edit large files use tools like