This commit is contained in:
parent
7ee0c34547
commit
abd7be2634
1 changed files with 8 additions and 6 deletions
14
cleanup.sh
14
cleanup.sh
|
@ -1,8 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
sudo find /var/lib/apt -type f -delete
|
find /var/lib/apt -type f -delete
|
||||||
sudo find /var/cache/apt -type f delete
|
find /var/cache/apt -type f -delete
|
||||||
sudo find /var/log -type f -regextype posix-extend -regex '.*\.(gz|xz|[0-9])' -delete
|
find /var/log -type f -regextype posix-extended -regex '.*\.(gz|xz|[0-9])' -delete
|
||||||
truncate -s0 $HOME/.bash_history && \
|
truncate -s0 $HOME/.bash_history
|
||||||
sudo find /var/log -type f -exec truncate -s0 '{}' '+' && \
|
find /var/log -type f -exec truncate -s0 '{}' '+'
|
||||||
sudo bash -c "dd if=/dev/zero of=/emptyfile bs=4M; rm -f /emptyfile; poweroff"
|
dd if=/dev/zero of=/emptyfile bs=4M;
|
||||||
|
rm -f /emptyfile;
|
||||||
|
poweroff
|
||||||
|
|
Loading…
Reference in a new issue