Last active
December 28, 2025 10:34
-
-
Save nosada/95c030d2fcea5ba536951e5568994053 to your computer and use it in GitHub Desktop.
Handy script for the person that using Arch box, Nginx and mkosi to earn disk spaces
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 | |
| rm -rf /var/cache/nginx/* | |
| rm -rf /var/cache/mkosi/* | |
| pacman -Scc --noconfirm | |
| mv /var/log/nginx/access.log /var/log/nginx/access.log.$(date '+%Y%m%d') | |
| gzip /var/log/nginx/access.log.$(date '+%Y%m%d') | |
| systemctl restart nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment