Menu

Post image 1
Post image 2
1 / 2
0

The 30 Linux Commands I Use Every Day on My VPS

DEV Community·Alex Chen·17 days ago
#FO5eNzIw
#beginners#cli#linux#fullscreen#enter#exit
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More