Categories
Uncategorized

Putting rm -rf in a script is always a bad idea

Today I found myself typing this.

for x in `find ~/Library/Developer/CoreSimulator/Devices -maxdepth 1 -mtime +60d`; do rm -rf $x; done

bash

It saved me a ton of disk space but … i could easily have blitzed something important using rm -rf. Maybe it would have been safer to move them into ~/.Trash instead.