[ms4w-users] cleaning up the server
Aaron Koning
aaronkoning at gmail.com
Thu Jun 8 22:41:55 EDT 2006
Hi Jeff,
Since PHP is installed with MS4W, you may want to use a bit of PHP code.
FIST uses the _stat_ PHP function to delete files that haven't been accessed
in 30 minutes (See how its done in FIST: http://tinyurl.com/fa9ws).
- You can use a .bat file to run the .php file.
- You can adjust the code to look for modification (mtime), creation
(ctime) and access (atime) times using the PHP _stat_ function.
- You can adjust the time so that only day old files are deleted.
- You can adjust the code to delete only certain extensions, etc.
Aaron
On 6/8/06, Jeff McKenna <jmckenna at dmsolutions.ca> wrote:
>
> yes the Chameleon "sess_" folders could be deleted as well occasionally.
>
> We might as well delete the entire contents of the tmp folder. I think
> I'll add this to the next MS4W release, give it a shot:
>
> - move the del-ms_tmp.bat up one folder to /ms4w
> - rename it to del-tmp.bat
> - change the contents of that file to:
>
> @ECHO OFF
>
> REM this script deletes the ALL contents of the tmp directory
> REM (i.e. the MapServer-created gifs)
>
> move tmp\README_tmp.txt .
> rmdir /S /Q tmp
> md tmp
> cd tmp
> md ms_tmp
> cd ms_tmp
> md buttons
> cd ../..
> move README_tmp.txt tmp
>
> echo cleaned TMP folder contents
>
>
> That might help u. Of course people using ka-map might not like their
> kacache folder being deleted...but speak up now if so!
>
> (if anyone has a smarter script please contribute it!)
>
> jeff
>
>
>
> > I know the del-ms_tmp.bat file cleans up the ms_tmp folder.....but do
> the
> > "sess" folders under tmp need to be deleted once in awhile also?
> >
> >
> > Kevin
> >
> >
>
> _______________________________________________
> ms4w-users mailing list
> ms4w-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ms4w-users
>
--
+--------------------------------------------
| Aaron Koning
| Information Technologist
| Prince George, BC, Canada.
+--------------------------------------------
| http://datashare.gis.unbc.ca/fist/
| http://datashare.gis.unbc.ca/gctp-js/
+--------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20060608/cc04886c/attachment.html
More information about the ms4w-users
mailing list