trap

Automatically execute commands after receiving signals by processes or the…

trap

Automatically execute commands after receiving signals by processes or the operating system. Can be used to perform cleanups for interruptions by the user or other actions.

trap -l

trap -p

trap 'echo "Caught signal {{SIGHUP}}"' {{SIGHUP}}

trap - {{SIGHUP}} {{SIGINT}}

Также может быть вам интересно:
LinuxFreeBSDТрюки BashТерминал/Консоль
← tracepath trash →