If you loaded new resource specifications
into the resource database using standard input or the
-xrm command line option
and now you would like to
save the settings permanently in a resource file,
you do not need to edit the file manually (although you
The -edit option allows you to write the
current contents of the resource database to a file.
xrdb -edit ~/.Xdefaults-hostname
This example saves the current contents of the database in the file .Xdefaults-hostname, in your home directory.
If you want to save a backup copy of an existing resource
file, use the -backup option, in addition to
the -edit option:
xrdb -edit ~/.Xdefaults-hostname -backup old
The string following the -backup option is used as an
extension that is appended to the old filename.
In this example, the old copy of
the .Xdefaults-hostname file
is saved as .Xdefaults-hostnameold.