[lug] q: ramdisk /tmp & mount plain files
David Morris
lists at morris-clan.net
Sun May 2 11:28:53 MDT 2010
On Sun, May 2, 2010 at 10:44, Chan Kar Heng <chankarheng at gmail.com> wrote:
> 1) wanted to ask some opinion on creating a ramdisk & using it as /tmp.
> that way, /tmp always starts off empty on a fresh boot.
> it's always fast to access /tmp too.
> since /tmp isn't meant to really keep things, it could be kept small?
> these days, most machines have tons of memory to spare anyway.
> isn't it a good idea?
> why isn't it common place?
What you are looking for is tmpfs. Automatically creates a ram-disk
at the specified mount point. Add this to your /etc/fstab:
tmpfs /tmp tmpfs defaults 0 2
On a laptop I typically use tmpfs for:
/tmp
/var/tmp
/var/lock
/var/run
--David
More information about the LUG
mailing list