Ask HN: Your shell console "sanity prompts"?
Does anyone have any "life saving" bash profile aliases, bashrc configurations or settings or restrictions otherwise, which you regularly institute to "hazard control" yours and others' human error? Anything would help; your settings for Vi/Vim, Bashrc, /profile, inputrc, and anything related to remote the likeless -- all the way up to explicit file and user mode reviews using Perl/Python/Bash scripts, or the BSD "cp/copy files" command, and human actions like GDrive/Dbox/TimeMachine backups.
For context: I'm just now past the worst of my recovery from some overly zealous housekeeping deletions from an non-backup-ed part of the filesystem on a remote DOcean droplet, over SSH. And, thank you for your effort in replying to me. I met a sysadmin who made a backup of all user home directories, then ran a script to delete (rm -rf) all data from users that haven't been logged in the last months. On that system the home directory of the user 'root' was /home causing all directories to be wiped. This makes me want some kind of the OS X "System Integrity Protection", but for CentOS and Ubuntu. I mean there HAS to be something like this? Maybe this is what the substitute user is all about and I just kinda suck! SELinux is likely a good solution for things like this. If your script should only delete home directories -> that's all it should be allowed to do. No protections. Instead making all the data redundant. Project files: exist in gh. Personal files: backed up. Software: everything can be reinstalled from scratch. Get a good backup solution and start backing up everything. Crashplan is not bad.