I am working on Linux Ubuntu 16.04.
In this challenge I want to remove some commands from the Linux shell.
Specifically, I want to remove the
I want that if a user will try to exit the shell with this command, it won't be possible or maybe even send some message instead.
Any idea how can I do it ?
I searched for a file named
find / -name exit
But it found only directories:
/usr/src/linux-headers-4.13.0-41-generic/include/config/have/exit /usr/src/linux-headers-4.13.0-41-generic/include/config/have/irq/exit /usr/src/linux-headers-4.13.0-43-generic/include/config/have/exit /usr/src/linux-headers-4.13.0-43-generic/include/config/have/irq/exit /usr/src/linux-headers-4.13.0-36-generic/include/config/have/exit /usr/src/linux-headers-4.13.0-36-generic/include/config/have/irq/exit /usr/src/linux-headers-4.15.0-43-generic/include/config/have/exit /usr/src/linux-headers-4.15.0-43-generic/include/config/have/irq/exit
I read here about using
trap like this
trap "ENTER-COMMAND-HERE" EXIT and I tried
trap "sh" EXIT but it still existing the shell.