"Fossies" - the Fresh Open Source Software Archive

Member "tin-2.4.1/tools/expiretover" (28 Aug 2013, 344 Bytes) of package /linux/misc/tin-2.4.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #! /bin/sh
    2 # expire old local cached tin overviews
    3 
    4 # purge all files which weren't accessed in the last numdays days
    5 numdays=28
    6 
    7 overviewbase=${TIN_INDEX_NEWSDIR-"${TIN_HOMEDIR-"$HOME"}/.tin"}
    8 if test -d $overviewbase ; then
    9     ( find $overviewbase/.news* -type f -name "[0-9]*.[0-9]" \
   10         -atime +$numdays |\
   11         xargs rm -f ) && exit 0
   12 fi
   13 exit 1