Linux find files by name, size or age and delete them safely
Bash Dasun Kalupahana 75 views
find . -name "*.log" # by name
find /var/log -type f -size +100M # larger than 100 MB
find . -type f -mtime +30 # older than 30 days
find . -name "*.tmp" -type f -print # preview first
find . -name "*.tmp" -type f -delete # then delete (cannot be undone)
find searches by name, size and modified time. Run it without -delete first to preview what matches.
Learn more on the blog
MySQL
Upgrade MySQL 8.0 to 8.4: What Breaks and How to Check
MySQL 8.0 reached end of life in April 2026, which means no...
7 min read
Linux
AWK gsub() Examples: Find and Replace Text in Linux
gsub() is AWK's find-and-replace. It replaces every match of a pattern in...
5 min read
Linux
AWK Remove Duplicates: Lines, Columns and CSV Rows
The shortest way to remove duplicate lines from a file in Linux...
5 min read