Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I was in a project folder running a custom Symfony console command. While debugging I had a print_r then an exit. For some strange reason when the script exited it threw me into the home directory.
The script creates files in the project folder so each run needs to flush it out first. Not cool running it after you realise you are in home :( -
michael3278yyeah.. learned that too the hard way. Now when I work on some recursive removal of files in code I copy the whole project directory first..
-
Seethe4608yI usually try to work the file removal into the script itself when I need to do this. This way I can't accidentally do that, and it saves me a tiny bit of time every time I run the script. Best practice has been tying the file removal to a CLI argument.
-
smittey3398ylearned that the hard way, too. Threw me into root usr/bin instead of a local folder. This was 2 weeks into my first project on my university placement year. I feel your pain!
-
orion-ix3548y@srichardson I hope you have a backup solution like CrashPlan or TimeMachine. If you don't, get on it right now and thank me later.
-
@orion-ix yeah I had time machine although s month old. It was good enough to get back the important files.
-
orion-ix3548yThat's good, at least you have something. But I'd suggest CrashPlan because it lets you backup to another machine you own. I've recently just got it and regular backups automatically done across two sites whenever I turn on my laptop.
-
Will need to look into that, sounds good. At present I have time machine running to an external drive. It quickly becomes full so I end up deleting old backups.
The deleting process can take forever sometimes so when I don't have time I disable time machine to stop the notifications. That's why my last backup was a month old. (Busy month 😂) -
orion-ix3548y@srichardson yeah I completely get where you're coming from. And leaving your portable drive a plugged in is not viable anymore because of these ransomwares that go around encrypting all your data. And backup is a chore, so if you have any way to automate the process, do it. But I still recommend a monthly backup to your portable drive just for redundancy.
Related Rants
Never! ever! EVER!!! run sudo rm -fr * inside your home directory! Hard lesson learned on a Monday :(
P.S it was not intentional at all!
undefined
hell
mac
terminal