Last Updated: February 25, 2016
·
387
· prashanthsadasivan

rm -r ./~ is way way different than rm -r ~

If, by some random chance, you make a folder named ~, be extremely careful.

rm -r ./~ means 'delete a folder in my current directory named ~'
rm -r ~ means 'delete my home folder'

don't name a folder ~. and don't use ~ in your .bashrc file

(back story: I set my GOPATH as '~/goworkspace'. go decides to make a folder named '~'. after a very lucky folder in my home directory having root permissions telling me that I couldn't delete it prompted me to immediately ctrl -c, I realized that my .ssh folder was deleted on my ec2 instance. The next 3 hours of my day was me creating a new ec2 instance, salvaging whatever was left of my home directory...).