Bash: Limit runtime of a process
20 Nov 2022TIL that timeout
exists.
You can simply prefix a command with a max runtime and it will be killed after the time runs out, e.g.:
timeout 30m ssh tunnelhost -f -n -M -L 80:somehost:80
TIL that timeout
exists.
You can simply prefix a command with a max runtime and it will be killed after the time runs out, e.g.:
timeout 30m ssh tunnelhost -f -n -M -L 80:somehost:80