different location than /tmp
Tim Writer
tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Tue Mar 7 05:38:12 UTC 2006
Vince Hillier <vince-WxfNDWQh5LNIo2TaICnI/Q at public.gmane.org> writes:
> On Sun, Mar 05, 2006 at 06:35:45PM -0500, Vince Hillier wrote:
> > On Sun, Mar 05, 2006 at 06:26:07PM -0500, Chris Aitken wrote:
> > > Chris Aitken wrote:
> > >
> > > >I am trying to download an ISO for the first time. I am getting the
> > > >error, 'There is not enough room on the disk to save
> > > >/tmp/aqxi1g8f.exe. Remove unnecessary files from the disk and try
> > > >again, or try saving in a different location.' Well, I /am/ tring to
> > > >save to a different location - to a separate hard drive,
> > > >'/backupdrive' as it has 5 free GB. But how do I specify a different
> > > >place for temp file to go than /tmp?
> > >
> > > I thought maybe there would be an option in wget to specify where temp
> > > file goes, bnut I don't see any such thing in wget --help or man wget...
> >
> > wget will download to the current PWD by default.
> >
> > You can link /tmp to your drive with 5GB free by typing:
> >
> > ln -s /tmp /backupdrive/tmp
>
> Ignore my dyslexia,
>
> ln -s /backupdrive/tmp /tmp
>
> is what you want.
This will only work if /tmp doesn't exist, i.e. if you remove it or move it
aside first. If you do this, be sure to:
# chown root:root /backupdrive/tmp
# chmod 1777 /backupdrive/tmp
Personally, I'm not a big fan of this approach. When the system is booting
up, /tmp won't be available (it will be a broken symlink) until /backupdrive
is mounted. This could break boot scripts and make your system unbootable.
If you want a large /tmp, it's best to make a large file system (in a spare
partition or logical volume) and mount it directly on /tmp, i.e. you would
have something like this in your /etc/fstab:
/dev/hda7 /tmp ext3 defaults 0 2
If you don't have free disk space, you could use a bind mount (available in
2.4 and later kernels).
/backupdrive/tmp /tmp none bind 0 0
This has fewer drawbacks than the symlink, IMHO.
Finally, many programs honour the TMPDIR environment variable and it's common
to have a large /var/tmp. In that case, just set TMPDIR=/var/tmp in your
environment. Sadly, many modern developers appear to be unfamiliar with
traditional UNIX conventions and standards. As a result, many modern apps
don't honour TMPDIR so YMMV.
--
tim writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org> starnix inc.
647.722.5301 toronto, ontario, canada
http://www.starnix.com professional linux services & products
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list