public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Garbage in /tmp or /var/tmp
@ 2008-04-13 16:38 Florian Philipp
  2008-04-13 17:07 ` Steven Lembark
  2008-04-13 19:02 ` Neil Bothwick
  0 siblings, 2 replies; 14+ messages in thread
From: Florian Philipp @ 2008-04-13 16:38 UTC (permalink / raw
  To: Gentoo-User

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

Hi list!

Due to disk space restrictions I've decided to make /tmp a symlink
to /var/tmp instead of reserving space for both. Maybe it would have
been wiser to make /tmp a symlink to a dedicated directory in /var/tmp
but now it's too late.

Anyway, now I've found /var/tmp crowded with thousands of files with six
letters long nonsensical names like "6mtgWC" or "bOaiA0" each 4.9 kB
big. "file" identifies them as "TrueType font data". They all belong to
my user.

Now I'm wondering where they come from, (maybe OOo, Epdfview or
Acroread?), and if I can I safely remove them.

By the way, does anyone know whether tracker writes to /tmp or /var/tmp?

Thanks in advance!

Florian Philipp

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-13 16:38 [gentoo-user] Garbage in /tmp or /var/tmp Florian Philipp
@ 2008-04-13 17:07 ` Steven Lembark
  2008-04-13 19:02 ` Neil Bothwick
  1 sibling, 0 replies; 14+ messages in thread
From: Steven Lembark @ 2008-04-13 17:07 UTC (permalink / raw
  To: gentoo-user


> Due to disk space restrictions I've decided to make /tmp a symlink
> to /var/tmp instead of reserving space for both. Maybe it would have
> been wiser to make /tmp a symlink to a dedicated directory in /var/tmp
> but now it's too late.

I'd suggest not symlinking /tmp since it is part of the
system startup. If you want to reserve a single space
just mount it under both /tmp and /var/tmp. That avoids
issues with not having any tmp space at all (or symlink
/var/tmp -> /tmp if you want to use a symlink).


-- 
Steven Lembark                                            85-09 90th St.
Workhorse Computing                                 Woodhaven, NY, 11421
lembark@wrkhors.com                                      +1 888 359 3508
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-13 16:38 [gentoo-user] Garbage in /tmp or /var/tmp Florian Philipp
  2008-04-13 17:07 ` Steven Lembark
@ 2008-04-13 19:02 ` Neil Bothwick
  2008-04-13 20:28   ` Volker Armin Hemmann
  1 sibling, 1 reply; 14+ messages in thread
From: Neil Bothwick @ 2008-04-13 19:02 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 387 bytes --]

On Sun, 13 Apr 2008 18:38:31 +0200, Florian Philipp wrote:

> Due to disk space restrictions I've decided to make /tmp a symlink
> to /var/tmp instead of reserving space for both.

Why not use tmpfs for /tmp? It usually requires very little space, and
will use swap if memory is tight.


-- 
Neil Bothwick

The careful application of terror is also a form of communication.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-13 19:02 ` Neil Bothwick
@ 2008-04-13 20:28   ` Volker Armin Hemmann
  2008-04-13 22:10     ` Peter Humphrey
  2008-04-14  3:36     ` Steven Lembark
  0 siblings, 2 replies; 14+ messages in thread
From: Volker Armin Hemmann @ 2008-04-13 20:28 UTC (permalink / raw
  To: gentoo-user

On Sonntag, 13. April 2008, Neil Bothwick wrote:
> On Sun, 13 Apr 2008 18:38:31 +0200, Florian Philipp wrote:
> > Due to disk space restrictions I've decided to make /tmp a symlink
> > to /var/tmp instead of reserving space for both.
>
> Why not use tmpfs for /tmp? It usually requires very little space, and
> will use swap if memory is tight.

I second that, tmpfs for /tmp is great:

tmpfs                 512M   12K  512M   1% /tmp
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-13 20:28   ` Volker Armin Hemmann
@ 2008-04-13 22:10     ` Peter Humphrey
  2008-04-14  3:36     ` Steven Lembark
  1 sibling, 0 replies; 14+ messages in thread
From: Peter Humphrey @ 2008-04-13 22:10 UTC (permalink / raw
  To: gentoo-user

On Sunday 13 April 2008 21:28:22 Volker Armin Hemmann wrote:
> On Sonntag, 13. April 2008, Neil Bothwick wrote:
> > Why not use tmpfs for /tmp? It usually requires very little space, and
> > will use swap if memory is tight.
>
> I second that, tmpfs for /tmp is great:
>
> tmpfs                 512M   12K  512M   1% /tmp

I can do better than that, on this system with 4GB RAM:

tmpfs           /tmp                    tmpfs   nodev,nosuid,size=6g    0 0

No that we're in a competition, you understand.

-- 
Rgds
Peter
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-13 20:28   ` Volker Armin Hemmann
  2008-04-13 22:10     ` Peter Humphrey
@ 2008-04-14  3:36     ` Steven Lembark
  2008-04-14  7:46       ` Neil Bothwick
                         ` (2 more replies)
  1 sibling, 3 replies; 14+ messages in thread
From: Steven Lembark @ 2008-04-14  3:36 UTC (permalink / raw
  To: gentoo-user

Volker Armin Hemmann wrote:
> On Sonntag, 13. April 2008, Neil Bothwick wrote:
>> On Sun, 13 Apr 2008 18:38:31 +0200, Florian Philipp wrote:
>>> Due to disk space restrictions I've decided to make /tmp a symlink
>>> to /var/tmp instead of reserving space for both.
>> Why not use tmpfs for /tmp? It usually requires very little space, and
>> will use swap if memory is tight.
>
> I second that, tmpfs for /tmp is great:
>
> tmpfs                 512M   12K  512M   1% /tmp

Catch: You loose it all on reboot.

Since things like vi keep their in-work backups
there, loosing the entire contents of /tmp after a
crash can be painful.

If you can redirect anything making in-work copies
to, say, /scratch or ~ then this works nicely (given
that you have enough core not to strangle on it).


-- 
Steven Lembark                                            85-09 90th St.
Workhorse Computing                                 Woodhaven, NY, 11421
lembark@wrkhors.com                                      +1 888 359 3508
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-14  3:36     ` Steven Lembark
@ 2008-04-14  7:46       ` Neil Bothwick
  2008-04-14  7:58         ` Philip Webb
  2008-04-14  8:26       ` [gentoo-user] " Michael Schmarck
  2008-04-14  9:22       ` [gentoo-user] " Alan McKinnon
  2 siblings, 1 reply; 14+ messages in thread
From: Neil Bothwick @ 2008-04-14  7:46 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

On Sun, 13 Apr 2008 23:36:42 -0400, Steven Lembark wrote:

> > I second that, tmpfs for /tmp is great:

> Catch: You loose it all on reboot.

You are supposed to. The LFS says that /tmp is for files that do not need
to survive a reboot. Baselayout now defaults to wiping /tmp at boot
anyway.

> Since things like vi keep their in-work backups
> there, loosing the entire contents of /tmp after a
> crash can be painful.

Then they are broken, such data should be stored in /var/tmp.


-- 
Neil Bothwick

Can you be a closet claustrophobic?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-14  7:46       ` Neil Bothwick
@ 2008-04-14  7:58         ` Philip Webb
  2008-04-15  0:48           ` forgottenwizard
  0 siblings, 1 reply; 14+ messages in thread
From: Philip Webb @ 2008-04-14  7:58 UTC (permalink / raw
  To: gentoo-user

080414 Neil Bothwick wrote:
> On Sun, 13 Apr 2008 23:36:42 -0400, Steven Lembark wrote:
>> vi keep their in-work backups there,
>> loosing the entire contents of /tmp after a crash can be painful.
> Then they are broken, such data should be stored in /var/tmp.

Vim defaults to keeping temporary files in  /var/tmp ,
but Mutt defaults to  /tmp  & Vim called by Mutt does the same.
Recently, I changed the default in  .muttrc  to use  /var/tmp  instead
& as a result I can happily have  /tmp  cleared at every reboot,
which reminds me, I need to delete many  /var/tmp/mutt-*  ... (smile).

-- 
========================,,============================================
SUPPORT     ___________//___,  Philip Webb : purslow@chass.utoronto.ca
ELECTRIC   /] [] [] [] [] []|  Centre for Urban & Community Studies
TRANSIT    `-O----------O---'  University of Toronto
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-user]  Re: Garbage in /tmp or /var/tmp
  2008-04-14  3:36     ` Steven Lembark
  2008-04-14  7:46       ` Neil Bothwick
@ 2008-04-14  8:26       ` Michael Schmarck
  2008-04-14  9:22       ` [gentoo-user] " Alan McKinnon
  2 siblings, 0 replies; 14+ messages in thread
From: Michael Schmarck @ 2008-04-14  8:26 UTC (permalink / raw
  To: gentoo-user

Steven Lembark <lembark@wrkhors.com> wrote:

> Volker Armin Hemmann wrote:
>> On Sonntag, 13. April 2008, Neil Bothwick wrote:
>>> On Sun, 13 Apr 2008 18:38:31 +0200, Florian Philipp wrote:
>>>> Due to disk space restrictions I've decided to make /tmp a symlink
>>>> to /var/tmp instead of reserving space for both.
>>> Why not use tmpfs for /tmp? It usually requires very little space, and
>>> will use swap if memory is tight.
>>
>> I second that, tmpfs for /tmp is great:
>>
>> tmpfs                 512M   12K  512M   1% /tmp
> 
> Catch: You loose it all on reboot.

That's no catch. /tmp is meant to be empty upon reboot.
No application should assume that things survive a reboot
in /tmp - you use /var/tmp for temporary stuff, which is
meant to be available after a reboot.

> Since things like vi keep their in-work backups
> there, 

What? I've got .blah.swp files all over the place.
But not in /tmp.

Michael

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-14  3:36     ` Steven Lembark
  2008-04-14  7:46       ` Neil Bothwick
  2008-04-14  8:26       ` [gentoo-user] " Michael Schmarck
@ 2008-04-14  9:22       ` Alan McKinnon
  2008-04-14 21:23         ` Volker Armin Hemmann
  2 siblings, 1 reply; 14+ messages in thread
From: Alan McKinnon @ 2008-04-14  9:22 UTC (permalink / raw
  To: gentoo-user

On Monday 14 April 2008, Steven Lembark wrote:
> > I second that, tmpfs for /tmp is great:
> >
> > tmpfs                 512M   12K  512M   1% /tmp
>
> Catch: You loose it all on reboot.

Doesn't matter. The standard definition for /tmp (per FHS) is "contains 
files that are not expected to persists across different invocations of 
a program". Never mind reboots, if you just exit and restart vi, it 
cannot expect the temp file to still be there.

vi is a sane program and will in all likelihood respect this 
almost-universal standard. If anyone wants different behaviour (can't 
think why...) then configure vi to use a different directory as a 
scratch pad

-- 
Alan McKinnon
alan dot mckinnon at gmail dot com

--
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-14  9:22       ` [gentoo-user] " Alan McKinnon
@ 2008-04-14 21:23         ` Volker Armin Hemmann
  0 siblings, 0 replies; 14+ messages in thread
From: Volker Armin Hemmann @ 2008-04-14 21:23 UTC (permalink / raw
  To: gentoo-user

On Montag, 14. April 2008, Alan McKinnon wrote:
>
> vi is a sane program and will in all likelihood respect this
> almost-universal standard. If anyone wants different behaviour (can't
> think why...) then configure vi to use a different directory as a
> scratch pad

it is not sane, but it would be surprising if it really does depend on /tmp 
surviving a reboot.
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-14  7:58         ` Philip Webb
@ 2008-04-15  0:48           ` forgottenwizard
  2008-04-15  5:16             ` Philip Webb
  0 siblings, 1 reply; 14+ messages in thread
From: forgottenwizard @ 2008-04-15  0:48 UTC (permalink / raw
  To: gentoo-user

On 03:58 Mon 14 Apr     , Philip Webb wrote:
> 080414 Neil Bothwick wrote:
> > On Sun, 13 Apr 2008 23:36:42 -0400, Steven Lembark wrote:
> >> vi keep their in-work backups there,
> >> loosing the entire contents of /tmp after a crash can be painful.
> > Then they are broken, such data should be stored in /var/tmp.
> 
> Vim defaults to keeping temporary files in  /var/tmp ,
> but Mutt defaults to  /tmp  & Vim called by Mutt does the same.
> Recently, I changed the default in  .muttrc  to use  /var/tmp  instead
> & as a result I can happily have  /tmp  cleared at every reboot,
> which reminds me, I need to delete many  /var/tmp/mutt-*  ... (smile).
> 
> -- 
> ========================,,============================================
> SUPPORT     ___________//___,  Philip Webb : purslow@chass.utoronto.ca
> ELECTRIC   /] [] [] [] [] []|  Centre for Urban & Community Studies
> TRANSIT    `-O----------O---'  University of Toronto
> -- 
> gentoo-user@lists.gentoo.org mailing list
> 
> 

Off-topic, I know, but can you post how to do this?

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-15  0:48           ` forgottenwizard
@ 2008-04-15  5:16             ` Philip Webb
  2008-04-15 16:43               ` forgottenwizard
  0 siblings, 1 reply; 14+ messages in thread
From: Philip Webb @ 2008-04-15  5:16 UTC (permalink / raw
  To: gentoo-user

080414 forgottenwizard wrote:
> On 03:58 Mon 14 Apr     , Philip Webb wrote:
>> Vim defaults to keeping temporary files in  /var/tmp ,
>> but Mutt defaults to  /tmp  & Vim called by Mutt does the same.
>> Recently, I changed the default in  .muttrc  to use  /var/tmp  instead
>> & as a result I can happily have  /tmp  cleared at every reboot,
>> which reminds me, I need to delete many  /var/tmp/mutt-*  ... (smile).
> Off-topic, I know, but can you post how to do this?

It doesn't seem OT to me (smile): in  ~/.muttrc  include the line

  set tmpdir="/var/tmp"

Vim otherwise continues to keep its  .swp  files
in the same dir as the file it's editing; only Mutt is affected,
but you are guaranteed recovery of an e-mail being edited during a crash.

To set the system to clear  /tmp  at boot,
edit  /etc/conf.d/bootmisc  to include the line

  WIPE_TMP="yes"

-- 
========================,,============================================
SUPPORT     ___________//___,  Philip Webb : purslow@chass.utoronto.ca
ELECTRIC   /] [] [] [] [] []|  Centre for Urban & Community Studies
TRANSIT    `-O----------O---'  University of Toronto
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-user] Garbage in /tmp or /var/tmp
  2008-04-15  5:16             ` Philip Webb
@ 2008-04-15 16:43               ` forgottenwizard
  0 siblings, 0 replies; 14+ messages in thread
From: forgottenwizard @ 2008-04-15 16:43 UTC (permalink / raw
  To: gentoo-user

On 01:16 Tue 15 Apr     , Philip Webb wrote:
> 080414 forgottenwizard wrote:
> > On 03:58 Mon 14 Apr     , Philip Webb wrote:
> >> Vim defaults to keeping temporary files in  /var/tmp ,
> >> but Mutt defaults to  /tmp  & Vim called by Mutt does the same.
> >> Recently, I changed the default in  .muttrc  to use  /var/tmp  instead
> >> & as a result I can happily have  /tmp  cleared at every reboot,
> >> which reminds me, I need to delete many  /var/tmp/mutt-*  ... (smile).
> > Off-topic, I know, but can you post how to do this?
> 
> It doesn't seem OT to me (smile): in  ~/.muttrc  include the line
> 
>   set tmpdir="/var/tmp"
> 
> Vim otherwise continues to keep its  .swp  files
> in the same dir as the file it's editing; only Mutt is affected,
> but you are guaranteed recovery of an e-mail being edited during a crash.
> 
> To set the system to clear  /tmp  at boot,
> edit  /etc/conf.d/bootmisc  to include the line
> 
>   WIPE_TMP="yes"
> 
> -- 
> ========================,,============================================
> SUPPORT     ___________//___,  Philip Webb : purslow@chass.utoronto.ca
> ELECTRIC   /] [] [] [] [] []|  Centre for Urban & Community Studies
> TRANSIT    `-O----------O---'  University of Toronto
> -- 
> gentoo-user@lists.gentoo.org mailing list
> 

Thanks. WIPE_TMP seems to be the default, fwiw.

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-04-15 16:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-13 16:38 [gentoo-user] Garbage in /tmp or /var/tmp Florian Philipp
2008-04-13 17:07 ` Steven Lembark
2008-04-13 19:02 ` Neil Bothwick
2008-04-13 20:28   ` Volker Armin Hemmann
2008-04-13 22:10     ` Peter Humphrey
2008-04-14  3:36     ` Steven Lembark
2008-04-14  7:46       ` Neil Bothwick
2008-04-14  7:58         ` Philip Webb
2008-04-15  0:48           ` forgottenwizard
2008-04-15  5:16             ` Philip Webb
2008-04-15 16:43               ` forgottenwizard
2008-04-14  8:26       ` [gentoo-user] " Michael Schmarck
2008-04-14  9:22       ` [gentoo-user] " Alan McKinnon
2008-04-14 21:23         ` Volker Armin Hemmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox