Ubuntu: CTRL+C doesn't help qutting “at” utility prompt. How to safely quit?



Question:

I ran the following code and when I reached the second heredoc I became stuck in an at prompt (see image below). How to safely quite from this (without braking anything)?

The code:

bash /dev/fd/40 40<< 'PMA'    cat << PMA_UNINSTALL | at 'now + 2 minutes'    phpdismod mcrypt mbstring   apt-get purge phpmyadmin -y  service apache2 restart  sed -i 's/Include \/etc\/phpmyadmin\/apache.conf/ /g' /etc/apache2/apache2.conf    PMA_UNINSTALL    PMA  

The promot:

enter image description here


Solution:1

The quit the at prompt, press CtrlD on a new line:

$ at now  warning: commands will be executed using /bin/sh  at> echo "hi"  at> <EOT>  job 6 at Sun Jan  1 20:20:00 2017  

The <EOT> is printed by at on pressing CtrlD.


Solution:2

CTRL+Z (or CTRL + some key near to Z), brought me back to Bash.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »