Difference between revisions of "File"

From GnuCash
Jump to: navigation, search
m (How can I edit the file?)
m (How can I edit the file?)
Line 6: Line 6:
  
 
=== How can I edit the file? ===
 
=== How can I edit the file? ===
The file itself is XML data but in <tt>gzip</tt>'d form (provided the corresponding setting in Edit->Preferences is activated, which is the default). In order to have a look at your data by a text editor, you need to open a terminal window (console window) and enter the following commands:
+
The file itself is XML data but in compressed from (compressed by the program <tt>gzip</tt>). This depends on the corresponding setting in Edit->Preferences where you can turn file compression on or off. By default it is turned on.
 +
 
 +
In order to have a look at your data by a text editor, you need to open a terminal window (console window) and enter the following commands:
 
  mv foobar foobar.gz
 
  mv foobar foobar.gz
 
  gunzip foobar.gz
 
  gunzip foobar.gz
Then you can open the file "<tt>foobar</tt>" in a text editor.  
+
where you need to replace "<tt>foobar</tt>" by your actual file name, of course. After these two commands have been entered, you can open the resulting file "<tt>foobar</tt>" in a text editor.  
  
 
If you intend to make some manual changes, make sure to have a backup of your original file somewhere in case you get something wrong.
 
If you intend to make some manual changes, make sure to have a backup of your original file somewhere in case you get something wrong.
  
 
Once you have edited and saved the file, you don't have to <tt>gzip</tt> it yourself; GnuCash will do this upon the next save.
 
Once you have edited and saved the file, you don't have to <tt>gzip</tt> it yourself; GnuCash will do this upon the next save.

Revision as of 08:53, 24 April 2007

The data file of GnuCash has two issues that are being asked again and again:

Where is the gnucash file?

The file name is what you first enter as file name. Just this. No prefix, no suffix, just the name. If you enter "/home/myself/foobar" in the "Save as..." dialog window, the file will be written into "/home/myself/foobar" and nothing else. See also FAQ#Q:_Where_is_my_.XML_data_file?

  • However, in addition to the original "foobar" file, GnuCash will also save backup files and log files. The additional backup files will be saved as "foobar.<TIMESTAMP>.xac", the log files will be saved as "foobar.<TIMESTAMP>.log". Those files can be deleted regularly if you don't need any further backup. See also FAQ#Q:_What_are_all_these_.xac_and_.log_files_filling_up_my_directory?

How can I edit the file?

The file itself is XML data but in compressed from (compressed by the program gzip). This depends on the corresponding setting in Edit->Preferences where you can turn file compression on or off. By default it is turned on.

In order to have a look at your data by a text editor, you need to open a terminal window (console window) and enter the following commands:

mv foobar foobar.gz
gunzip foobar.gz

where you need to replace "foobar" by your actual file name, of course. After these two commands have been entered, you can open the resulting file "foobar" in a text editor.

If you intend to make some manual changes, make sure to have a backup of your original file somewhere in case you get something wrong.

Once you have edited and saved the file, you don't have to gzip it yourself; GnuCash will do this upon the next save.