Created
June 5, 2015 13:45
-
-
Save killpond/bccc517344dee659ea99 to your computer and use it in GitHub Desktop.
Check magento session file usage
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
# Find all the session files older then 3 days then display the number of files. | |
find /path/to/your/website/root/var/session -name 'sess_*' -type f -mtime +3 | wc -l | |
# Same as above, but display them in "less", browse with PageUP / PageDown. | |
find /path/to/your/website/root/var/session -name 'sess_*' -type f -mtime +3 | less | |
# Delete all the files older then 3 days. | |
find /path/to/your/website/root/var/session -name 'sess_*' -type f -mtime +3 -exec rm {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment