Georg Wilckens durandal at
Sun Jun 11 15:55:13 PDT 2000

On Sun, Jun 11, 2000 at 03:14:27PM -0400, Gerard Beekmans wrote:
> > > /tmp get cleaned out every time you boot. /var/tmp doesn't- but I'd 
> > > be careful how you told it to be cleaned out- you'd hate to clean out 
> > > a temp file that some program was using.
> > 
> > According to my brand new LFS-Installation - it doesn't. Erasing a
> Nope, you're right. Cleaning out /tmp and other directories every time
> you boot the computer isn't part of any standard I'm awarey of.

I don't know of any either. It makes sense to do so though. It
wouldn't hurt including a hint to that to the LFS docs but it's not
really important. A user who is able to install a LFS-system should
know about /tmp.
> > temp file which someone had open doesn't hurt - unless the file was
> > closed and will still be needed.
> > Btw. what command should be used to clean out tmp? rm -rf /tmp?
> > Doesn't follow symlinks, does it? What about hardlinks?
> > Hmm... wondering. Maybe rm -d, but that damages the filesystem.
> I do it simply like this. At some point a cleandirs script is run
> containing nothing more than:
> #!/bin/sh
> /bin/rm -r /tmp; mkdir /tmp; chmod 1777 /tmp

Yeah, just checked. I thought "-r" could follow a symlink and flatten
another directory due to that. But -r doesn't follow symlinks and
directories cannot be hardlinked. So.. no problem. Btw... this is even
simpler: /bin/rm -rf /tmp/*

Georg Wilckens <durandal at>

Budget: A method for going broke methodically.
Mail archive:
IRC access: server: port: 6667 channel: #LFS
News Reader access:
Unsubscribe: email lfs-discuss-request at and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)

More information about the lfs-dev mailing list