Posts by BashSnippets

@BashSnippets

BashSnippets

Building a free bash script library. One script at a time | https://bashsnippets...
North America bashsnippets.xyz Joined May 2026
1.4k Points21 Badges2 Connections2 Followers22 Following

Posts by BashSnippets

BashSnippets in Tutorials 4 min read
Here's how it usually goes: You deploy something. Traffic is light. Server load sits at 15% and you move on to the next thing. Then traffic grows, or a cron job stacks on itself, or a memory leak slowly eats through your RAM over 72 hours. By the ti...
post-cover-18494
BashSnippets in Articles 4 min read
Nginx crashed on a Saturday night. An OOM kill, probably — I was running a Node app that leaked memory like a broken faucet. The service went down at 2:14 AM. I found out at 8:30 AM when I opened my laptop and saw Slack messages from six hours earlie...
post-cover-18487
BashSnippets in Tutorials 6 min read
I Google "bash remove file extension" at least once a month. Every time I need ${filename%.txt} I have to look it up. I've written that exact syntax probably 40 times across different scripts. My brain refuses to memorize it. And every time I need i...
post-cover-18495
BashSnippets in Articles 3 min read
It was a WordPress site on a $5 DigitalOcean droplet. Client's small business. Nothing fancy. I had SSH access. I had root. I had every tool I needed to set up automated backups. I just... didn't. Because it was a small site. Because I'd "get to it ...
post-cover-18480
BashSnippets in Tutorials 2 min read
Every experienced Linux user has been there: you install something, or move directories around, and suddenly command not found appears for tools you know are installed. You check which, type, echo $PATH, and still waste 10-20 minutes hunting down th...
post-cover-17087
BashSnippets in Tutorials 1 min read
The Problem You're setting file permissions and you type chmod 754... or was it 744? You Google it. Again. Or you're starting a new bash script and you copy the header block from your last script because you can't remember the exact set -euo pipef...
post-cover-16991
BashSnippets in Tutorials 2 min read
The Problem You're deploying a script and need the right file permissions. You type chmod 754... or was it 744? You Google it. You find a Stack Overflow thread from 2011. You get it wrong anyway. chmod's octal notation is one of those things every...
post-cover-16987
BashSnippets in Articles 2 min read
$? holds the exit code of the last command that ran. You've seen it. You've probably checked it. What you might not have is a reliable reference for what each value actually means — and more importantly, what to do about it in your script. Here's t...
post-cover-16902
BashSnippets in Tutorials 2 min read
Cron job tutorials have a problem. They teach you the five-field syntax, show you a couple of examples like 0 2 , and send you on your way. What they don't cover is everything that needs to go around the expression for the job to actually work rel...
post-cover-16899
BashSnippets in Articles 2 min read
Let me be honest about how BashSnippets started. . . I wasn't trying to build a brand. I was just tired of opening the same Stack Overflow threads every time I needed to check disk space, clean up old logs, or back up a folder. The scripts weren't ...
post-cover-16878
BashSnippets in Articles 1 min read
I kept running into the same problem while working in Linux and dev environments. The small intricacies between zsh and bash hit me at the worst time.... every time. When in need of a Bash command, I’d end up doing the same cycle: Open Google Searc...
BashSnippets in Articles 1 min read
My disk hit 100% on a Thursday night. Just a silent crash and a bunch of errors I found the next day. I had nothing running in the background watching for problems. 1. Disk space warning The script I needed before that Thursday happened. #!/bin/ba...
chevron_left

Latest Jobs

View all jobs →