Compare commits

..

13 commits

Author SHA1 Message Date
Tobias Schmidl
cbe837176f Add 'cleanup/' from commit 'b1a5f3d704dc5af9da3b3ef7c43dadcbcd1bf2fc'
git-subtree-dir: cleanup
git-subtree-mainline: 6b9a2380ce
git-subtree-split: b1a5f3d704
2023-07-25 08:36:19 +02:00
Tobias Schmidl
b1a5f3d704 2021-09-24 11:14:38 +02:00
Tobias Schmidl
a7f6d84a52 2019-06-05 07:20:59 +00:00
Tobias Schmidl
f846a62eaa 2019-06-05 07:20:09 +00:00
Tobias Schmidl
1ec3f99d30 2019-04-12 07:47:00 +00:00
Tobias Schmidl
68c9aabe5e 2019-02-22 08:55:39 +01:00
Tobias Schmidl
c1b90ff2f9 2019-02-22 08:55:25 +01:00
Tobias Schmidl
cd1f052991 2019-02-19 06:19:09 +01:00
Tobias Schmidl
51ad5f1768 2018-10-19 10:45:04 +02:00
Tobias Schmidl
6be7ab800a 2018-06-11 09:18:26 +02:00
Tobias Schmidl
abd7be2634 2018-06-11 08:44:52 +02:00
Tobias Schmidl
7ee0c34547 2018-06-11 08:38:27 +02:00
Tobias Schmidl
eea1a2af99 2018-06-11 04:25:29 +02:00

14
cleanup/cleanup.sh Normal file
View file

@ -0,0 +1,14 @@
#! /bin/sh
rm -rf /root/.cache /root/.rnd
find /tmp -type d -name 'systemd-*-systemd-timesyncd.service*' -exec rm -rf '{}' '+'
find /var/tmp -type d -name 'systemd-*-systemd-timesyncd.service*' -exec rm -rf '{}' '+'
find /var/lib/apt -type f -delete
find /var/cache/apt -type f -delete
find /var/log -type f -regextype posix-extended -regex '.*\.(gz|xz|[0-9])' -delete
truncate -s0 $HOME/.bash_history
[ -w $HOME/.zsh_history ] && truncate -s0 $HOME/.zsh_history
find /var/log -type f -exec truncate -s0 '{}' '+'
dd if=/dev/zero of=/emptyfile oflag=dsync status=progress bs=4M;
rm -f /emptyfile;
systemctl poweroff