DEV Community

Discussion on: What mistake did you make last week?

Collapse
 
garthvador profile image
Quentin Caillaud
find . -mindepth 1 -maxdepth 1 -type d -newermt '2019-05-21 00:00' | xargs rm -r

In the wrong directory... Hopefully it was not on production environment, but still customer had access to it. Easily fixable but my heart skipped a beat when I realized that I instead of deleting a few pdf files that we had generated the same day, I had deleted the /src directory, so basically all the code, of our stage environment !