Quantcast
Channel: How to prevent accidental execution of potentially harmful commands (e.g. reboot) - Ask Different
Browsing latest articles
Browse All 9 View Live

Answer by Criggie for How to prevent accidental execution of potentially...

Another way to learn not to do this is exemplified by the sl package on a bunch of linux distros. sl is a sometimes typo for ls and instead of being helpful, it gives you a steam locomotive in text...

View Article



Answer by David Anderson for How to prevent accidental execution of...

Springboarding from @Seamus's answer:You could just add the following function to your ~/.zshrc file.sudo() { case "${1:-}" in reboot) echo "Are you REALLY sure you want to do this?" echo "If so, enter...

View Article

Answer by Seamus for How to prevent accidental execution of potentially...

Springboarding from @benwiggy's answer:Create a small script - reboot :#!/bin/bashecho "Are you REALLY sure you want to do this?"echo "If so, enter 'sudo r-reboot', and I'll pass it along."Mark reboot...

View Article

Answer by benwiggy for How to prevent accidental execution of potentially...

Just create a reboot command in /usr/local/bin, which should come first in your $PATH.

View Article

How to prevent accidental execution of potentially harmful commands (e.g....

I spend a lot of time in Terminal.app, and in iTerm2 - mostly using SSH connections to some Linux boxes. I'm used to issuing reboot commands to these Linux boxes, but earlier this evening I...

View Article

Browsing latest articles
Browse All 9 View Live




Latest Images