-
-
Save uzi18/259af8878c95862fa882f213c27737af to your computer and use it in GitHub Desktop.
nettemp remove data before 365 days
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
db=$(ls /var/www/nettemp/db) | |
for i in $db | |
do | |
sqlite3 /var/www/nettemp/db/$i "DELETE FROM def WHERE time <= date('now','-365 day'); VACUUM;" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment