I do not know how to do the fancy link to the fancy pipeline status
Download purger is a go application that targets at keeping your downloads folder clean and worry free. It is able to clean up files in the specified folder, and keep a log of the files it deleted.
Linux binary can be downloaded with github releases with the latest tags. Binaries on other platforms will have to be manually built from source. Clone the repo, get go and build it for your system.
Usage of /home/shiqi/go/bin/downloadpurger:
-dir string
path to the folder you wish to purge (default "~/Downloads")
-duration string
string representing duration of downloads to clear, e.g.: (default "2week")
-o string
path to log file (default "~/logs/dwpurger.log")
-y pass in -y to run purger without warning
or do /path/to/your/binary -help
, it will show the same thing.
- dir specifies what directory to look and purge. Defaults to the home/Downloads of your current folder. Might have weird behaviors on non-linux environments as I didn't bother testing.
./downloadpurger -dir="~/path/to/a/different/folder"
- duration specifies the age of files that the app purges, app understands
hour
,day
,week
,month
andyear
, defaults to two weeks./downloadpurger -duration="10year" # why even bother cleaning downloads at that point
- the flag o specifies what file to log the deletion records
./downloadpurger -o="./your/path/to/a/log/file.log"
- pass in
-y
if you do not want a confirmation, e.g., when you run the purger on computer start up and REALLY don't care about the things in your downloads folder :)./downloadpurger -y
DON'T, if for whatever reasons you depend on the Download folder for crucial tasks.
On linux:
- Grab the binary
- Make a script that calls the binary
#!/bin/sh /path/to/the/binary -y # and whatever args you want to put in
- Add it to cronjob with the
@reboot
tagAnd append the line to the crontab filecrontab -e
save, done.@reboot /path/to/the/script
Appreciate pull requests or issues :)