commit eea1a2af9965cb7ef45bd1d0d9aaae853caa1c5b Author: Tobias Schmidl Date: Mon Jun 11 04:25:29 2018 +0200 diff --git a/cleanup.sh b/cleanup.sh new file mode 100644 index 0000000..a0c8f6a --- /dev/null +++ b/cleanup.sh @@ -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" \ No newline at end of file