Every executed command in UNIX systems have an exit status code on it. That means that we can actually identify if a command was successfully completed of generate some kind of error.
After execute a command on your terminal window type the following:
$ echo $?
If your previous code was successfully executed this command should show "0" which indicates that your command was successfully executed.