In some strange situations it would be more helpful for us to find the previously executed command’s status(success or not). We can figure it out by using the following command;
# echo $?
0 : The '0' represents, successfully executed command status. :-)
Any other digit : represents, the previously executed command was failed. :-(
---- [root@localhost ~]# gdgmd bash: gdgmd: command not found [root@localhost ~]# echo $? 127 ---- [root@localhost ~]# man ls [root@localhost ~]# echo $? 0 ----