Editing (vi) large files in Solaris
When editing extremely large files using
vi the following message may appear when you open it:
Not enough space in /var/tmp
The default directory /var/tmp is used for the
vi editing buffer and needs space equal to roughly twice the size of the file which you are working on, because
vi uses extra lines for buffer manipulation.
We can use the following steps to edit your large file without receiving the above error message:
- open vi
- set the buffering directory
- edit your large file
$ vi :set directory=/tmp :e filename
/tmp with any directory containing enough space for use as the vi buffer. Replace
filename is the name of your large file.