SUMMARY: making 'vi' use a different area than /var/tmp

From: Marina.Daniels@cs.tas.gov.au
Date: Thu Mar 11 1999 - 18:57:00 CST


     
wow, what a fantastic response, took about 5 minutes for replies to come
flooding in.

ORIGINAL QUESTION:

> When you "vi" a large file in solaris 2.x, it takes up a lot of room
> in /var/tmp
>
> - is there an easy way that you can make it use another temporary
> location instead of /var/tmp ?
>
ANSWER:

In answer to your questions, I need this for a temporary fix for one
particular
user, as the machine he works on has a very small /var area and he looks at
some
particularly large files.

Thanks to all the people who answered so incredibly quickly, here is one of
the
replies, from James Cayz.
     
Easy - from several locations:
     
>From your .exrc file, insert the line
se directory={new-tmp-directory}
(If you have other set options, append the directory=... to the end)
     
You can also set a shell variable "EXINIT" to
"se directory={new-tmp-directory}", for temporary / short term changes.
     
Last, if you intend to :r (read) the file into an blank buffer, you can
open up vi, and issue the command
:se dir={new-tmp-directory} [Enter]
     
In any event, once you have done this, you can check it by
:se all[Enter]
     
And the directory variable should be correctly set to the new tmp
directory.
     
I do this a lot when dealing with password or otherwise confidential files
- set to locked-to-everyone-but-me tmp directory.
     
Hope this helps.
     
James Cayz



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:16 CDT