
Ask HN: Your shell console "sanity prompts"? - levimaes
Does anyone have any &quot;life saving&quot; bash profile aliases, bashrc configurations or settings or restrictions otherwise, which you regularly institute to &quot;hazard control&quot; yours and others&#x27; human error? Anything would help; your settings for Vi&#x2F;Vim, Bashrc, &#x2F;profile, inputrc, and anything related to remote the likeless -- all the way up to explicit file and user mode reviews using Perl&#x2F;Python&#x2F;Bash scripts, or the BSD &quot;cp&#x2F;copy files&quot; command, and human actions like GDrive&#x2F;Dbox&#x2F;TimeMachine backups.<p>For context: I&#x27;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.
======
mtmail
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.

~~~
levimaes
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!

~~~
viraptor
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.

------
viraptor
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.

