NTHP

Starting Off With a Star

Mac

The year started off with a star for me. A star at the end of a command, in the wrong directory. A command that is sometimes compared to a firearm. Powerful, yet dangerous. One that I have warned students about, and showed a small portion of its true power. rm -rf.

I was working in a git directory, and needed to nuke it and reset. So I went about as I usually do. rm -rf * && git reset –hard. Burn the place to the ground, and pick up from the last commit. The issue, my terminal went back to my home folder at some point. The moment I hit return, I knew what I had done. Errors that rm couldn’t remove things in ~/go lit up like a fire alarm. I mashed ^c as quickly as I could, but it was too late. My home folder, was permanently damaged.

But now is not time to mourn. Now, is no time at all.

- Thanos

Thankfully, I use a Mac. With a little help from the time stone Time Machine, hope is not lost.

Booting into recovery mode. I fired up Time Machine, and selected the most recent local snapshot. Faster than Thanos could do no wrong snap his fingers, Time Machine was done. Rebooting into macOS, everything was back. everything is, how it was.

rm is like a firearm. Don’t point it at anything you don’t want to destroy. And have a backup solution.


Reply via email