Yesterday before going to sleep I started a long process of which I thought it would be finished before I stand up, therefore I used
./command && sudo poweroff my system is configured to not ask for a password for sudo poweroff, so it should shutdown when that command is finished.
However it is still running and I want to use that system for other tasks now. Having that command running in the background is not an issue, but having my system possibly shutting down any second is.
Is there a way to prevent zsh from executing the poweroff command while making sure that the first one runs until it is done?
Would editing the /etc/sudoers file so that the system asks for my password still help in this case?
{ ./command && sudo poweroff; } &or as part of a zsh script (in a terminal session or not?)?htopto increase the niceness of the command, so it doesn't interfere with what I'm doing.