Core File Deletion

In this example, we automatically and routinely delete core files on data disks.

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

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

DeleteCoreFiles

        init
                status =piktstatus
                level =piktlevel
                task "Automatically delete core files on data disks"
                input file "=dirsuser_obj"
                dat $filesystem 1

        rule
                =exec "=find $filesystem -type f -name core -exec =lld {} \\;
                             >> =notice_log -exec =rm {} \\; 2>/dev/null"

Open Hand 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 2008-03-27.   This site is PIKT® powered.
PIKT® is a registered trademark of the University of Chicago.   Copyright © 1998-2008 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
full disks
Pikt script