How to Avoid Accidentally Deleting Files in Terminal

Jamie Bullock
Level Up Coding
Published in
3 min readOct 6, 2020

--

Techniques for avoiding file deletion disasters on Mac and Linux

Photo by Gary Chan on Unsplash

I’ll never forget the time when I was working as a network engineer, and a coworker brought an entire college campus grinding to a halt with a simple misplaced dot.

The mistake my colleague made, was to type:

rm -rf /*

--

--