Last active
December 15, 2022 18:59
-
-
Save pvaviloff/9c3f0f72bd35128c0e97cab3822304d7 to your computer and use it in GitHub Desktop.
This file contains 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 | |
echo ---- Start: | |
date | |
echo ---- | |
sudo truncate /var/log/*log* --size 0 | |
echo log files truncated | |
sudo rm /var/log/*.gz | |
echo gz files removed | |
sudo rm /tmp/trace.*.xt | |
echo trace files from tmp removed | |
journalctl --disk-usage | |
journalctl --vacuum-size=50M | |
journalctl --verify | |
journalctl --disk-usage | |
echo var/log/journal removed | |
echo ---- End: | |
date | |
echo ---- | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment