Re: Empty /tmp when shutting down

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 25 February 2004 06:16 am, Robert Vangel wrote:
> Yes, the line at the top is merely to make sure that it uses /bin/sh as
> the interpreter.
>
> The cron entry for cron.daily would have /bin/sh as the command to
> execute, and having /etc/cron.daily/* as an argument, so that everything
> gets executed by /bin/sh

Oh, OK, I see how it works.  So scripts in /etc/cron.daily can either have the 
shabang iine or not, and they will all be executed when /etc/crontab runs the 
runparts line for that directory?

>
> Charles Howse wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On Wednesday 25 February 2004 05:56 am, Christopher K. Johnson wrote:
> >>Robert Vangel wrote:
> >>>You could create a init script in rc6.d and rc0.d which does an
> >>>
> >>>rm -rf /tmp/* /tmp/.*
> >>>
> >>>I don't think it has one built in though
> >>>
> >>>Coume - Lubox.com wrote:
> >>>>Hello,
> >>>>Is it possible to empty the /tmp directory when I shutdown my laptop?
> >>>>If I remember well, I was doing that under MDK but I cannot remember
> >>>> how
> >>>>
> >>>>:/
> >>>>
> >>>>Thxs in advance
> >>>>Ludo
> >>
> >>Better yet - check out tmpwatch.  And there is a daily cron job which
> >>cleans out temporary files more than a certain number of hours old.  See
> >>/etc/cron.daily/tmpwatch and edit the times there if you want to delete
> >>them sooner.  In any case there is a mechanism to delete old temp files
> >>and that is where it is controlled.  So you could do nothing and know
> >>that the /tmp files will be deleted in 10 days.
> >
> > Interesting thread...I just looked in /etc/cron.daily, and my default
> > tmpwatch file is executable, but doesn't have the shabang line at the
> > top, so it is listed as a plain text file.  Is that normal?
> >
> > - -------------------------------------
> > /usr/sbin/tmpwatch 240 /tmp
> > /usr/sbin/tmpwatch 720 /var/tmp
> > for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
> >     if [ -d "$d" ]; then
> > 	/usr/sbin/tmpwatch -f 720 $d
> >     fi
> > done
> > - -------------------------------------
> >
> > - --
> > Charles Howse
> > Jackson, TN
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.3 (GNU/Linux)
> >
> > iD8DBQFAPJFW/S+VsB9RMKgRAk46AJ4/Inwarpt9vx5o99O/7cAeeGP6mQCeI5Qa
> > sODQpvm9SUq9nRzBdROdLJM=
> > =0oZ1
> > -----END PGP SIGNATURE-----

- -- 
Charles Howse
Jackson, TN
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAPJT3/S+VsB9RMKgRAtjuAJ4rw1T8eZIVjTim1jyeBHXcmNI8mQCeIcE6
smBfK6ZsTUwG1UC07L/RXX0=
=T4iL
-----END PGP SIGNATURE-----




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux