Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How vi create tmp file in /tmp directory

59 views
Skip to first unread message

Teddy

unread,
Jul 25, 2008, 4:53:07 AM7/25/08
to
Hello,

I noticed that most of time while opening file bigger than 300MB vi
throws error that "tmp file too large.".
Is there any way to remove this error apart from increasing size of /
tmp directory.
I mean can't I specify to vi that use other directory for creating /
tmp file.

One more thing I noticed that I dont have write permission to /tmp
directory. So when I fire vi command or crontab -e how it creates
tmperoary file in /tmp ?

Thanks in advance

jpd

unread,
Jul 25, 2008, 5:00:45 AM7/25/08
to
On Fri, 25 Jul 2008 01:53:07 -0700 (PDT), Teddy <neeraj...@gmail.com> wrote:
> I mean can't I specify to vi that use other directory for creating /
> tmp file.

Was that a question? Anyway, here I look in vi(1) (`man 1 vi' at a
command line near you) and it'll tell me I can at least use use TMPDIR
to point it elsewhere.


> One more thing I noticed that I dont have write permission to /tmp
> directory. So when I fire vi command or crontab -e how it creates
> tmperoary file in /tmp ?

You don't? The rest of that paragraph seems to contradict that assertion.


--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
This message was originally posted on Usenet in plain text.
Any other representation, additions, or changes do not have my
consent and may be a violation of international copyright law.

Teddy

unread,
Jul 25, 2008, 7:07:00 AM7/25/08
to
I tried setting TMPDIR variable but still got same error.

About permission on tmp direcotry. I was asking how application
created tmp file. On my machine it seems that it changes it effectve
UID to that of root and then create tmp file or I guess it requesting
to some daemon for that.

jpd

unread,
Jul 25, 2008, 7:14:35 AM7/25/08
to
On Fri, 25 Jul 2008 04:07:00 -0700 (PDT),
Teddy <neeraj...@gmail.com> wrote:
> I tried setting TMPDIR variable but still got same error.

What did you try, exactly? In particular, merely setting the variable
isn't good enough: You need to ``export'' it so any program will get it
handed by the shell. How you do this depends a bit on the shell used.
This is of course detailed in the manpage for your shell.


> About permission on tmp direcotry. I was asking how application
> created tmp file. On my machine it seems that it changes it effectve
> UID to that of root and then create tmp file or I guess it requesting
> to some daemon for that.

Note that you can speculate but that it leaves not much room to comment
on your actual question. For that, you'll need to provide information
like the actual permissions on the directory and the files and the
precise progression of events you observed.

Another thing you might want to investigate is the existence of
``quotas'' on your system.

Teddy

unread,
Jul 25, 2008, 8:38:50 AM7/25/08
to
I am using cshell and after setting TMPDIR var to my home directory I
also checked env output to make sure that environment is set.
but still got same error. I am using Solaris 10. I dont know how to
check version of vi.

martman

unread,
Jul 25, 2008, 1:44:47 PM7/25/08
to

Have you tried the following

type vi by itself without a file parameter
:set directory=/opt/tmp (for example)
:e /the/file/you/want/to/edit

www.computers-it.com

Michael Tosch

unread,
Jul 31, 2008, 5:10:47 PM7/31/08
to

This is certainly the correct answer.
And has been posted a few hours ago as "vi editor FAQ"

Using vim instead of vi would solve many issues - and tmp file
handling is improved, too.
vim -n /the/file/you/want/to/edit
won't use a tmp file at all.


--
echo imhcea\.lophc.tcs.hmo |
sed 's2\(....\)\(.\{5\}\)2\2\122;s1\(.\)\(.\)1\2\11g;1s;\.;::;2'

0 new messages