Created
June 27, 2016 18:16
-
-
Save khalid-s/392eeefed6aa4302e8821aa74652073f to your computer and use it in GitHub Desktop.
A small bash to clear symfony cache regularly on a unix based system. This can be coupled with crontab and you can configure the delay and path to folder
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 | |
| delay=1 #In minutes | |
| folderToManage=var/cache/**/* | |
| find $folderToManage -type f -mmin +$delay -delete | |
| find . -empty -type d -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment