Skip to content

Instantly share code, notes, and snippets.

View sohag1192's full-sized avatar
🎯
Focusing

Md Sohag Rana sohag1192

🎯
Focusing
View GitHub Profile
@Iman
Iman / clean.sh
Last active November 13, 2024 21:44
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@pklaus
pklaus / clearRAM.sh
Last active September 9, 2024 17:09
A Script to Clear Cached RAM on Linux
#!/bin/bash
## Bash Script to clear cached memory on (Ubuntu/Debian) Linux
## By Philipp Klaus
## see <http://blog.philippklaus.de/2011/02/clear-cached-memory-on-ubuntu/>
if [ "$(whoami)" != "root" ]
then
echo "You have to run this script as Superuser!"
exit 1
fi