How do I revert the sudo less /private/etc/cups/printers.conf command? I have used the above command to try and find my printer's address using the web.

Now I would like to revert this setting using terminal.

Can anyone help me with this?
Less isn't modifying anything in your printer settings, it's just displaying the contents of the file. For example:

less test.txt 


will show the contents of the test text file. If you exit using q, and you reopen the Terminal window, you will no longer see the IP address of the printer without using the 

less


command again.