warbo-utilities: 7ef5cb5c2b50febdd3b9807ba0bc09c36d71e927

     1: From: Chris Warburton
     2: Date: Mon, 26 Jun 2017 04:28:49 +0100
     3: State: resolved
     4: Subject: Clear out old news
     5: Message-Id: <f13c3392de23240a-0-artemis@nixos>
     6: resolution: fixed
     7: 
     8: News folders are getting pretty big, we should clear out high traffic ones like
     9: BBCNews and HackerNews periodically, e.g. after refreshing, using a command like
    10: 
    11: CUTOFF=$(date -d "last month" "+%s")
    12: find Mail/feeds/HackerNews/cur/ -type f |
    13:   while read -r F
    14:   do
    15:     D=$(grep "^Date: " < "$F" | sed -e 's/^Date: //g')
    16:     SECS=$(date -d "$D" "+%s")
    17:     if [[ "$SECS" -lt "$CUTOFF" ]]
    18:     then
    19:       rm "$F"
    20:     fi
    21:   done

Generated by git2html.