This commit is contained in:
Tobias Schmidl 2018-06-11 04:25:29 +02:00 committed by GitHub
commit eea1a2af99

8
cleanup.sh Normal file
View file

@ -0,0 +1,8 @@
#! /bin/sh
sudo find /var/lib/apt -type f -delete
sudo find /var/cache/apt -type f delete
sudo find /var/log -type f -regextype posix-extend -regex '.*\.(gz|xz|[0-9])' -delete
truncate -s0 $HOME/.bash_history && \
sudo find /var/log -type f -exec truncate -s0 '{}' '+' && \
sudo bash -c "dd if=/dev/zero of=/emptyfile bs=4M; rm -f /emptyfile; poweroff"