This article hasn't been updated for over 5 years. The information below may be obsolete.
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.
Resolution
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
For example:
$ vi :set directory=/tmp :e filename
Replace /tmp with any directory containing enough space for use as the vi buffer. Replace filename is the name of your large file.