Hot — Fgoptionaluselessfilesbin

Example: ls is in /bin . Deleting it makes even fg impossible.

Make it executable:

Check with:

chmod -x ~/bin/old_tool && mv ~/bin/old_tool ~/bin/old_tool.disabled Never blindly delete from /bin , /sbin , /lib , /etc . What seems “optional” to you may be critical. fgoptionaluselessfilesbin hot

#!/bin/bash echo "Scanning for optional, useless, hot files..." find /tmp -type f -size +50M -atime +1 -exec rm -vi {} ; Useless core dumps find /home -name "core.*" -type f -exec rm -vi {} ; Optional cache >500MB du -sk ~/.cache/* | awk '$1 > 500000 print $2' | xargs rm -rfv Orphaned .bin in user's personal bin if [ -d ~/bin ]; then find ~/bin -type f -perm -001 -atime +30 -exec echo "Consider removing: {}" ; fi Example: ls is in /bin

echo "Hot useless optional cleanup complete." What seems “optional” to you may be critical

BetterShifting Terry

About the Author - BetterShifting Terry

I enjoy playing with bike tech - both bike building and wheel building, bike maintenance and of course, Di2. Besides writing content and working on the technical side of BetterShifting, I also work as a Software Developer in The Netherlands. Read more on the About this site page.

Ko-fi button

Support the site

If you want to support the site, consider using the site affiliate links, or buying me a coffee.

Comments

Was this page useful? Any questions? Leave a comment below and I'll get right back to you.