[Nottingham] any issues symlinking /tmp -> /var/tmp ?

Rob Andrews rob at impure.org.uk
Tue Aug 16 00:04:32 BST 2005


[13-Aug-2005 18:35.43 (BST) / Michael]
 > Quick question, on my Debian-based system I would like to symlink /tmp 
 > to /var/tmp since /var is on a separate partition with space and / is 
 > occasionally quickly filled. Any golden rules broken by doing this?

Often /var is mounted some few stages after the root filesystem on a
machine with separate filesystems. Should anything during the essential
boot item startup phase require /tmp storage space it may find /tmp is a
dangling symlink.

However, you could configure your software to use /var/tmp rather than
/tmp upon startup. Many applications use /var/tmp anyway (e.g.
rpmbuild). If you are mostly concerned with commandline applications you
are running from a shell, try:

export TMPDIR=/var/tmp
export TEMPDIR=/var/tmp

The absence of these usually means the application will default to /tmp.

Hope this is of use.



More information about the Nottingham mailing list