Skip to main content
ExLibris
  • Subscribe by RSS
  • ExLibris Dev

    Automatically Deleting Old Reports from p_manage_15 (or most logs)

    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Description:
    We have an automated manage-15 process that creates a lot of files (so many that it eventually clogs the data print directory.) Is there a script which would automatically delete the files older than 2 weeks?

    Resolution:
    Insert the "cd" and "find" commands shown below at the end of $aleph_proc/p_manage_15 (where "srf_man15" is the p_report_name in the p_manage_15 submission):

    ex_p_manage_15:
    end_p_proc
    cd $data_print
    find . -name CVS -prune -o -name "srf_man15*" -mtime +14 -print | xargs rm -rf >& /dev/null
    exit


    • Article last edited: 10/8/2013
    //doorbell.io feedback widged