TOPIC: TEMPORARY FILE
The peril of /tmp
19th July 2008By default, I think that Windows plants its temporary files in c:\windows\temp
. On Linux or on Ubuntu at least, the equivalent area is /tmp
. However, not realising that /tmp
when you shut down and start your PC could cause the silly blunder that I made today. I was doing a spot of reorganisation on my spare PC when I dumped some files in /tmp
from a hard drive that I had added. I was reformatting the drive as ext3
following its NTFS former life. As part of this, I was editing fstab
to automatically mount the thing and a system restart ensued. I ended up losing whatever I put into /tmp
, a very silly blunder. Luckily, I had the good sense not to put anything critical in there, so nothing of consequence has been lost. Nevertheless, a lesson has been learnt: Windows allows its temporary area to pick up all kinds of clutter until you clear it, while Linux clears the thing regularly. It's remarkable how Windows thinking can cause a howler when you have a lapse of concentration using a *NIX operating system, even for someone who uses the latter every day.