blob: a7ad008aac54d33108d1628f5d7e8286e1f5012e (
plain) (
tree)
|
|
I regularly amass a mass of junk files in my ~/public_html that I don't need.
Most of these were uploaded to share something on IRC / email / IM, and aren't
needed after some number of days.
To address this, I wrote a small garbage collector in C. Its file retention
period is shamelessly stolen from the kind folks at http://0x0.st/ and
https://ttm.sh/ .
SETUP:
Edit the paths in cleanup.c
compile cleanup.c
add a daily cronjob that calls cleanup
USAGE:
cleanup
-v verbose
-n dry run
-x filename
exclude filename from cleanup
TO UPLOAD:
I have a flaky shell script 'ptmp' that scps files to the right directory
with a temporary filename.
|