[Mapserver-users] How to empty the TMP directory
m.spring at gmx.de
m.spring at gmx.de
Tue Nov 4 21:08:24 PST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul Ramsey <pramsey at refractions.net> writes:
>
> find /maptmp -type f -cmin +15 -exec /bin/rm {} ';'
>
I use a slight modification (linux, probably other unices):
find /data/web/tmp -type f -maxdepth 1 -amin +60 -print0 | xargs -0 -r rm -f
Reasons:
* my tmp directory has subdirs for other stuff, therefore -maxdepth 1
* I do produce several temporary files I want to delete, therefore
-type f
* I collect all output of find with -print0 and pipe it collected by
xargs to rm. This avoids starting a process with rm for every found
file and only triggers rm once for all found files. This has its
advantage on heavily loaded machines
Kind regards
Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.6 and Gnu Privacy Guard <http://www.gnupg.org/>
iD8DBQE/qIXIxxUzQSse11ARAuW+AJ9g4zAd0tJTfr+2N6sEMfNQQOIr8wCfYi+N
Dp2odQq9EdrOJ048ulgZYMU=
=JImW
-----END PGP SIGNATURE-----
More information about the MapServer-users
mailing list