command1 && command2command2 is executed if, and only if, command1 returns an exit status of zero.
command1 || command2command2 is executed if and only if command1 returns a non-zero exit status.
command1 && comamnd2 (if exist status is zero) || command3 (if exit status is non-zero)if command1 is executed successfully then shell will run command2 and if command1 is not successful then command3 is executed. Example:
$ rm myf && echo "File is removed successfully" || echo "File is not removed"