Browser Cache Clear

In this sample dirs_user_alarms.cfg file, we handle a common housekeeping task:  clear web browser caches so as to save disk space.

The EmptyNetscapeCache script just operates silently (although every file removal command is logged in the alert's log file).

EmptyNetscapeCache makes reference to the =dirsuser_obj macro, which resolves to the name of the DirsUser.obj file.  The script follows.

EmptyNetscapeCache

        init
                status =piktstatus
                level =piktlevel
                task "Automatically clear browser caches"
                input proc "=apls =dirsuser_obj 2>/dev/null"
                dat $dir $

        rule
                if    $dir !~ "lost\\+found|tmp|pikt"
                   && -e "$dir/.netscape/cache"
                        =execwait "=find $dir/.netscape/cache -type f -mtime +2
                                         -exec =rm {} \\;"
                endif

This is just one program example.  You could add rules, or write new scripts, for example to:  report and fix incorrect home directory ownerships and permissions, fix home directory files, report orphaned user directories, report if home directories and files disappear, etc.

For more examples, see Samples.

Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2019-01-12.   This site is PIKT® powered.
Copyright © 1998-2019 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
near full disks
Pikt script