Restoring files from CVSweb

Periodically, you may accidentally delete or corrupt system files that you need to restore. Fortunately, many of these files are available over the web using OpenBSD's CVSWeb.

For example, suppose you want to restore the default login.conf(5). Follow the src -> etc -> etc.amd64 -> login.conf -> Revision 1.18 download link. Then, we download the contents:

# ftp -o login.conf ''
# mv login.conf /etc/login.conf

Note: We must enclose the URL in quotes to get the shell to parse it correctly.

The -o flag lets us specify that we want to save the file into login.conf in our current working directory. We use it to overwrite /etc/login.conf.