lucyferus23 tutaj się mylisz, jest różnica pomiędzy sudo a dowolnym edytorem. Visudo poinformuje Cię jeżeli popełnisz jakiś błąd przy edycji, poda nawet numer linii i nie nadpisze pliku sudoers.
Cytuj:
visudo parses the sudoers file after the edit and will not save the
changes if there is a syntax error. Upon finding an error, visudo will
print a message stating the line number(s) where the error occurred and
the user will receive the "What now?" prompt. At this point the user
may enter "e" to re-edit the sudoers file, "x" to exit without saving
the changes, or "Q" to quit and save changes. The "Q" option should be
used with extreme care because if visudo believes there to be a parse
error, so will sudo and no one will be able to sudo again until the
error is fixed. If "e" is typed to edit the sudoers file after a
parse error has been detected, the cursor will be placed on the line
where the error occurred (if the editor supports this feature).
źródło
http://www.linuxcommand.org/man_pages/visudo8.html