Skip to content

Instantly share code, notes, and snippets.

@VictorTpo
Last active June 14, 2019 12:39
Show Gist options
  • Save VictorTpo/8fc2778a1f0cb7d59be969b634efa35d to your computer and use it in GitHub Desktop.
Save VictorTpo/8fc2778a1f0cb7d59be969b634efa35d to your computer and use it in GitHub Desktop.

Disk size

df -h

Repo size

sudo du -h --max-depth=1

Heavy files

sudo find / -size +500M

Log

sudo vi /etc/logrotate.d/nginx # edit cnf
sudo logrotate -f /etc/logrotate.d/nginx # reload

Remove some file

find . -mindepth 1 -mtime +365 -type f -delete # mtime == days_count

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment