cleanup-linux.sh

This commit is contained in:
Mahdi Dibaiee 2021-11-27 11:33:26 +00:00
parent bfb04b75a2
commit 9cf34d3e1c

View File

@ -84,6 +84,16 @@ scp -P 2222 ~/.tmux.conf root@localhost:/root
scp -r -P 2222 ~/.config/nvim root@localhost:/root/.config/ scp -r -P 2222 ~/.config/nvim root@localhost:/root/.config/
{% endhighlight %} {% endhighlight %}
One thing I found necessary, due to limited storage, is a script to cleanup each linux version after I'm done with them, since they create a couple of files in different places. I call this `cleanup-linux.sh`:
{% highlight bash %}
VERSION=$1
rm /boot/vmlinuz-linux${VERSION}
rm /boot/initramfs-linux${VERSION}.img
rm /boot/initramfs-linux-fallback${VERSION}.img
rm -r /usr/lib/modules/${VERSION}
{% endhighlight %}
# Debugging # Debugging
There is a `pr_debug` function used over the code, in order to enable those logs in `dmesg` for a specific module, you can do this: There is a `pr_debug` function used over the code, in order to enable those logs in `dmesg` for a specific module, you can do this: