5.2. jf_join: join a journal

Sometimes you have a journal and a standard, not journaled, file you would like to use as a journaled file: you can use jf_join utility program to add your file to the list of journaled files managed by the journal. This is a usage example (the journal has been created at the previous paragraph):

tiian@linux:~/tutorial> ls -la > jf_tut_foo-data1
tiian@linux:~/tutorial> ls -la jf_tut_foo-*
-rw-r--r--  1 tiian users 2038 2005-08-29 22:22 jf_tut_foo-data1
-rw-r--r--  1 tiian users 8278 2005-08-29 22:12 jf_tut_foo-journal
tiian@linux:~/tutorial> jf_join -j jf_tut_foo-journal jf_tut_foo-data1
tiian@linux:~/tutorial> jf_report -j jf_tut_foo-journal
<?xml version="1.0" encoding="UTF-8"?>
  <header magic_number='0x41524153' version='1' file_id_mask='0x38' 
      file_id_mask_shift='3' size_mask='0xffffffc0' size_mask_shift='6' 
      file_size='4194304' file_num='3' rotation_threshold='0.800' 
      ctrl_recs='36' journal_recs='32980' />
  <journaled_file_table max_files='8' number_of_files='2' 
    <file id='0' name='jf_tut_foo-journal' last_pos='32980' last_size='0' 
        status='0' last_uc_pos='0' last_uc_size='32980' stream='0x804b008' />
    <file id='1' name='jf_tut_foo-data1' last_pos='0' last_size='791' 
        status='0' last_uc_pos='0' last_uc_size='0' stream='(nil)' />
file jf_tut_foo-data1 has been joined to journal jf_tut_foo-journal and can now be used with libjf API.