1
0
mirror of https://github.com/xzeldon/vwdump.git synced 2025-06-28 03:08:14 +03:00
vwdump/delete.sh
jmqm fcda17fc09
Remove old backups (#11)
- Added `delete` script 🎉.
  - `DELETE_AFTER` variable must be greater than `0`.
2021-07-13 22:04:46 -05:00

11 lines
249 B
Bash

#!/bin/sh
# Go to the backups directory.
cd /backups
# Delete tar.xz archives older than x days.
find . -iname "*.tar.xz" -type f -mtime +$DELETE_AFTER -exec rm -f {} \;
# Echo that script ran.
echo "Deleted files older than $DELETE_AFTER days."