Created
November 28, 2015 02:02
-
-
Save iods/7d20538e82fb94c49086 to your computer and use it in GitHub Desktop.
Remove Magento sessions (file stored) in a certain specified timeframe. Run through a cron job.
This file contains hidden or 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 | |
# Remove Sessions older than specified time. | |
DIR=/var/www/magento/var/session/ | |
RANGE=30 | |
/usr/bin/find $DIR -depth -mtime +$RANGE -exec rm -rf '{}' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment