The 30 Linux Commands I Use Every Day on My VPS
After 3 years of managing a $5 VPS, these are the commands that stuck.
File Operations
1. Find Large Files (When Disk is Full)
# Top 20 largest files in current directory du -ah . | sort -rh | head -20
# Find files larger than 100MB find . -type f -size +100M -exec ls -lh {} \;
# Quick directory sizes du -sh * / | sort -rh
Enter fullscreen mode
Exit fullscreen mode
2. Search File Contents
# Search for text in all files recursively grep -r "search term" /path/to/search
# With line numbers and file names grep -rn "function" src/
# Only show matching filenames grep -rl "TODO" .
# Case insensitive, only .js files grep -ri "error" --include = "*.js" .
Enter fullscreen mode
Exit fullscreen mode
3.…