Last active
August 29, 2015 14:01
-
-
Save smbanaie/1c4c782e6e84a8322daf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chmod u+x runnable file # user + Execute | |
chmod o+x runnable file # other + Execute | |
tar -xvf file.tar | |
# Show right version of java | |
file /etc/alternatives/java /etc/alternatives/javac | |
#Empty A File | |
cat /dev/null > ImageStore.log | |
#See Overall Storage | |
df | |
#see disk usage | |
du -h /tmp | |
#empty old kernel that caused /boot full | |
sudo apt-get purge $( dpkg --list | grep -P -o "linux-image-\d\S+" | grep -v $(uname -r | grep -P -o ".+\d") ) | |
or | |
Type uname -r. This will show you the kernel you're using currently, so you don't want to remove this. | |
Run the following command: dpkg --list | grep linux-image. This will show the all the kernels that are installed. | |
Note down the names of all the kernels which you want to remove. | |
To remove the kernels, run: sudo apt-get purge linux-image-x.x.x.x-xyz (replace the kernel name with an appropriate one). | |
Update the GRUB: sudo update-grub2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment