back in the 90s, stacey lindburg taught me that when deleting from the prod db to always write the statement as a select first then edit it to be a delete after auditing it.
this advice has saved my ass at least once a year since.
back in the 90s, stacey lindburg taught me that when deleting from the prod db to always write the statement as a select first then edit it to be a delete after auditing it.
this advice has saved my ass at least once a year since.
@mcc @ghorwood Actually I forgot the better variant I use, no cd needed. rm -rf ../dirname/*
@ghorwood That's really good advice…
I do a similar thing where whenever I find myself doing an rm -rf I do a confirmatory `cd`, like:
cd ../current_directory_name && rm -rf *
The point of this is that if I'm in a directory *other* than current_directory_name when I run this command, the cd will fail and the rm will refuse to run. Helpful if (I do this) one often runs commands by quickly tapping "up" a few times and hitting return
@mcc @ghorwood I never do rm -rf * so it's not in history. I'll instead do cd .. && rm -rf dirname/* or similar.
GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.
All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.