diff -ru tar-1.12/src/buffer.c tar-1.12.1/src/buffer.c
--- tar-1.12/src/buffer.c	Fri Apr 25 15:48:46 1997
+++ tar-1.12.1/src/buffer.c	Fri Jul  3 12:46:24 1998
@@ -55,6 +55,7 @@
 
 static tarlong total_written;	/* bytes written on all volumes */
 static tarlong bytes_written;	/* bytes written on this volume */
+static time_t start_time ;
 
 /* FIXME: The following four variables should ideally be static to this
    module.  However, this cannot be done yet, as update.c uses the first
@@ -71,6 +72,7 @@
 /* Where we write list messages (not errors, not interactions) to.  Stdout
    unless we're writing a pipe, in which case stderr.  */
 FILE *stdlis;
+FILE *stdrec;
 
 static void backspace_output PARAMS ((void));
 static int new_volume PARAMS ((enum access_mode));
@@ -160,6 +162,36 @@
   fprintf (stderr, _("Total bytes written: "));
   print_tarlong (total_written, stderr);
   fprintf (stderr, "\n");
+#define PRINT_TROUPUT
+#ifdef PRINT_TROUPUT
+/*
+ * Comment the next line out if you have problems. Joerg Weule
+ */
+  {
+       time_t end_time = time(0);
+       double sec = end_time - start_time ;
+       double t = ((double)total_written) ;
+       fprintf (stderr, _("Total bytes written: %.0f"),t);
+       if ( t >= 1e9 ) fprintf(stderr, _(" (%3.1f Gb)"),t/1e9 ); else
+       if ( t >= 1e6 ) fprintf(stderr, _(" (%3.1f Mb)"),t/1e6 ); else
+       if ( t >= 1024 ) fprintf(stderr, _(" (%3.1f Kb)"),t/1024 );
+       fprintf(stderr,"\n");
+       if ( sec > 0.1 ){
+         long s, m, h = sec ;
+          m = h ;
+         h /= 3600 ;
+          m -= h * 3600 ;
+          s = m ;
+          m /= 60 ;
+          s -= m / 60 ;
+         fprintf (stderr, _("Elapsed time: %02d:%02d:%02d, %g sec\n"), h,m,s,sec);
+         if ( NULL == volume_label_option )
+           fprintf (stderr, _("Throughput per second: %.0fKb/sec\n"),
+             t/sec/1024);
+       }
+  }
+#endif
+
 }
 
 /*--------------------------------------------------------.
@@ -669,6 +701,7 @@
 {
   int backed_up_flag = 0;
 
+  start_time = time(0) ;
   stdlis = to_stdout_option ? stderr : stdout;
 
   if (record_size == 0)
@@ -823,6 +856,101 @@
   setmode (archive, O_BINARY);
 #endif
 
+  stdrec = stdlis ;
+  if ( record_file_name != NULL )
+    {
+#define INSERT_TIMESTAMP
+#ifdef INSERT_TIMESTAMP
+      /*
+       * A record-file name with '%T' will be expanded with a decimal
+       * value for the timestamp of the archive. This is the time value
+       * stored in the label record.
+       * If you are using only one computer, this should be a unique number.
+       * You are able to create different rec-files for all your archives,
+       * as well as finding the index of your archive in a reliable way.
+       *
+       * Another way would be to let us set the timestamp by another option.
+       * tar --timestamp <ts-number> ...
+       */
+      char rfn[256];
+      if ( subcommand_option == CREATE_SUBCOMMAND ) {
+        char*p= record_file_name ;
+        int i = 0 ;
+        int n;
+        while ( p[0] != '\0' ) {
+          if ( p[0] == '%' && p[1] == 'T' ) {
+            /* i += */ sprintf(rfn+i,"%d",start_time);
+            i = strlen(rfn) ;
+            p += 2 ;
+          } else { rfn[i++] = *p++ ; }
+        }
+        rfn[i] = '\0' ;
+      } else strcpy(rfn,record_file_name);
+#else
+      char*rfn=record_file_name;
+#endif
+      if ( ( stdrec = fopen(rfn,"w")) == NULL )
+        {
+          fprintf(stdlis,"Cannot open %s.\n",record_file_name);
+          exit(1);
+        }
+    }
+
+  if ( ( record_file_name ) && ( volume_label_option ) )
+    {
+      fprintf(stdrec,
+        "loc             timestamp is %d \n",
+        start_time);
+    }
+  if ( record_file_name && (record_size != 10240) )
+    {
+      fprintf(stdrec,
+        "loc             block length is %d bytes = %d * 512 bytes \n",
+        record_size,record_size>>9);
+    }
+
+
+#if defined(MTIOCGET)
+  /* Prints the file number of the archive */
+  if ( record_file_name )
+    {
+      struct mtget get ;
+      int i ;
+      i = ioctl(archive,MTIOCGET,&get);
+      if (( i == 0 ) && ( get.mt_fileno >= 0 ))
+        {
+          fprintf(stdrec,
+            "loc             number of the file is %d \n",
+            get.mt_fileno );
+        }
+    }
+#endif
+
+#if defined(MTIOCPOS)
+  /* Prints the tape block number on every Linux SCSI-device */
+  if ( record_file_name )
+    {
+      struct mtpos pos ;
+      int i ;
+      i = ioctl(archive,MTIOCPOS,&pos);
+      if ( i == 0 )
+        {
+          fprintf(stdrec,
+            "loc             number of the first block is %d\n",
+            pos.mt_blkno );
+        }
+    }
+#endif
+  if ( record_file_name )
+    {
+      char *d = malloc(PATH_MAX);
+      if( d && getcwd(d,PATH_MAX) )
+        fprintf(stdrec,
+            "loc             current directory is %s\n",
+            d);
+    }
+
+
   switch (access)
     {
     case ACCESS_READ:
@@ -856,7 +984,7 @@
 	  assign_string (&current_file_name, record_start->header.name);
 
 	  record_start->header.typeflag = GNUTYPE_VOLHDR;
-	  to_oct (time (0), 1 + 12, record_start->header.mtime);
+	  to_oct (start_time, 1 + 12, record_start->header.mtime);
 	  finish_header (record_start);
 #if 0
 	  current_block++;
@@ -958,6 +1086,7 @@
       memset ((void *) record_start, 0, BLOCKSIZE);
       sprintf (record_start->header.name, "%s Volume %d", volume_label_option, volno);
       to_oct (time (0), 1 + 12, record_start->header.mtime);
+      to_oct (start_time, 1 + 12, record_start->header.mtime);
       record_start->header.typeflag = GNUTYPE_VOLHDR;
       finish_header (record_start);
     }
diff -ru tar-1.12/src/common.h tar-1.12.1/src/common.h
--- tar-1.12/src/common.h	Tue Apr 22 08:31:03 1997
+++ tar-1.12.1/src/common.h	Thu Jan 29 01:36:57 1998
@@ -93,6 +93,9 @@
 /* Name of this program.  */
 GLOBAL const char *program_name;
 
+/* Time of writing.  */
+GLOBAL time_t start_time;
+
 /* Main command option.  */
 
 enum subcommand
@@ -141,6 +144,9 @@
 /* Boolean value.  */
 GLOBAL int block_number_option;
 
+/* Name of the index file */
+GLOBAL char *record_file_name;
+
 /* Boolean value.  */
 GLOBAL int checkpoint_option;
 
@@ -335,6 +341,7 @@
 /* Module buffer.c.  */
 
 extern FILE *stdlis;
+extern FILE *stdrec;
 extern char *save_name;
 extern long save_sizeleft;
 extern long save_totsize;
diff -ru tar-1.12/src/create.c tar-1.12.1/src/create.c
--- tar-1.12/src/create.c	Fri Apr 25 15:48:48 1997
+++ tar-1.12.1/src/create.c	Thu Jan 29 01:00:13 1998
@@ -329,7 +329,6 @@
   to_oct ((long) sum, 8, header->header.chksum);
   header->header.chksum[6] = '\0';	/* zap the space */
 
-  set_next_block_after (header);
 
   if (verbose_option
       && header->header.typeflag != GNUTYPE_LONGLINK
@@ -342,6 +341,8 @@
       current_format = archive_format;
       print_header ();
     }
+
+  set_next_block_after (header);
 }
 
 /* Sparse file processing.  */
diff -ru tar-1.12/src/list.c tar-1.12.1/src/list.c
--- tar-1.12/src/list.c	Fri Apr 25 22:16:30 1997
+++ tar-1.12.1/src/list.c	Thu Jan 29 11:57:27 1998
@@ -120,7 +120,7 @@
 
 	case HEADER_ZERO_BLOCK:
 	  if (block_number_option)
-	    fprintf (stdlis, _("block %10ld: ** Block of NULs **\n"),
+	    fprintf (stdrec, _("block %10ld: ** Block of NULs **\n"),
 		     current_block_ordinal ());
 
 	  set_next_block_after (current_header);
@@ -131,7 +131,7 @@
 
 	case HEADER_END_OF_FILE:
 	  if (block_number_option)
-	    fprintf (stdlis, _("block %10ld: ** End of File **\n"),
+	    fprintf (stdrec, _("block %10ld: ** End of File **\n"),
 		     current_block_ordinal ());
 	  break;
 
@@ -208,7 +208,7 @@
 	  if (written > size)
 	    written = size;
 	  errno = 0;		/* FIXME: errno should be read-only */
-	  check = fwrite (data_block->buffer, sizeof (char), written, stdlis);
+	  check = fwrite (data_block->buffer, sizeof (char), written, stdrec);
 	  set_next_block_after ((union block *)
 				(data_block->buffer + written - 1));
 	  if (check != written)
@@ -221,8 +221,8 @@
 	}
       if (multi_volume_option)
 	assign_string (&save_name, NULL);
-      fputc ('\n', stdlis);
-      fflush (stdlis);
+      fputc ('\n', stdrec);
+      fflush (stdrec);
       return;
 
     }
@@ -367,6 +367,9 @@
 		   ? &next_long_name
 		   : &next_long_link);
 
+          assign_string (&current_file_name, header->header.name);
+          print_header();
+
 	  set_next_block_after (header);
 	  if (*longp)
 	    free (*longp);
@@ -614,7 +617,7 @@
   char *name;
 
   if (block_number_option)
-    fprintf (stdlis, _("block %10ld: "), current_block_ordinal ());
+    fprintf (stdrec, _("block %10ld: "), current_block_ordinal ());
 
   if (verbose_option <= 1)
     {
@@ -624,11 +627,11 @@
 
       if (quoted_name)
 	{
-	  fprintf (stdlis, "%s\n", quoted_name);
+	  fprintf (stdrec, "%s\n", quoted_name);
 	  free (quoted_name);
 	}
       else
-	fprintf (stdlis, "%s\n", current_file_name);
+	fprintf (stdrec, "%s\n", current_file_name);
     }
   else
     {
@@ -650,8 +653,12 @@
 	  break;
 
 	case GNUTYPE_LONGNAME:
+	  modes[0] = 'L';
+	  break;
+
 	case GNUTYPE_LONGLINK:
-	  ERROR ((0, 0, _("Visible longname error")));
+	  /*ERROR ((0, 0, _("Visible longname error")));*/
+	  modes[0] = 'K';
 	  break;
 
 	case GNUTYPE_SPARSE:
@@ -743,22 +750,22 @@
 	ugswidth = pad;
 
 #if USE_OLD_CTIME
-      fprintf (stdlis, "%s %s/%s %*s%s %s %s",
+      fprintf (stdrec, "%s %s/%s %*s%s %s %s",
 	       modes, user, group, ugswidth - pad, "",
 	       size, timestamp + 4, timestamp + 20);
 #else
-      fprintf (stdlis, "%s %s/%s %*s%s %s",
+      fprintf (stdrec, "%s %s/%s %*s%s %s",
 	       modes, user, group, ugswidth - pad, "", size, timestamp);
 #endif
 
       name = quote_copy_string (current_file_name);
       if (name)
 	{
-	  fprintf (stdlis, " %s", name);
+	  fprintf (stdrec, " %s", name);
 	  free (name);
 	}
       else
-	fprintf (stdlis, " %s", current_file_name);
+	fprintf (stdrec, " %s", current_file_name);
 
       switch (current_header->header.typeflag)
 	{
@@ -766,26 +773,26 @@
 	  name = quote_copy_string (current_link_name);
 	  if (name)
 	    {
-	      fprintf (stdlis, " -> %s\n", name);
+	      fprintf (stdrec, " -> %s\n", name);
 	      free (name);
 	    }
 	  else
-	    fprintf (stdlis, " -> %s\n", current_link_name);
+	    fprintf (stdrec, " -> %s\n", current_link_name);
 	  break;
 
 	case LNKTYPE:
 	  name = quote_copy_string (current_link_name);
 	  if (name)
 	    {
-	      fprintf (stdlis, _(" link to %s\n"), name);
+	      fprintf (stdrec, _(" link to %s\n"), name);
 	      free (name);
 	    }
 	  else
-	    fprintf (stdlis, _(" link to %s\n"), current_link_name);
+	    fprintf (stdrec, _(" link to %s\n"), current_link_name);
 	  break;
 
 	default:
-	  fprintf (stdlis, _(" unknown file type `%c'\n"),
+	  fprintf (stdrec, _(" unknown file type `%c'\n"),
 		   current_header->header.typeflag);
 	  break;
 
@@ -798,24 +805,24 @@
 	case FIFOTYPE:
 	case CONTTYPE:
 	case GNUTYPE_DUMPDIR:
-	  putc ('\n', stdlis);
+	  putc ('\n', stdrec);
 	  break;
 
 	case GNUTYPE_VOLHDR:
-	  fprintf (stdlis, _("--Volume Header--\n"));
+	  fprintf (stdrec, _("--Volume Header--\n"));
 	  break;
 
 	case GNUTYPE_MULTIVOL:
-	  fprintf (stdlis, _("--Continued at byte %ld--\n"),
+	  fprintf (stdrec, _("--Continued at byte %ld--\n"),
 		   from_oct (1 + 12, current_header->oldgnu_header.offset));
 	  break;
 
 	case GNUTYPE_NAMES:
-	  fprintf (stdlis, _("--Mangled file names--\n"));
+	  fprintf (stdrec, _("--Mangled file names--\n"));
 	  break;
 	}
     }
-  fflush (stdlis);
+  fflush (stdrec);
 }
 
 /*--------------------------------------------------------------.
@@ -836,16 +843,16 @@
       decode_mode ((unsigned) mode, modes + 1);
 
       if (block_number_option)
-	fprintf (stdlis, _("block %10ld: "), current_block_ordinal ());
+	fprintf (stdrec, _("block %10ld: "), current_block_ordinal ());
       name = quote_copy_string (pathname);
       if (name)
 	{
-	  fprintf (stdlis, "%s %*s %.*s\n", modes, ugswidth + DATEWIDTH,
+	  fprintf (stdrec, "%s %*s %.*s\n", modes, ugswidth + DATEWIDTH,
 		   _("Creating directory:"), length, name);
 	  free (name);
 	}
       else
-	fprintf (stdlis, "%s %*s %.*s\n", modes, ugswidth + DATEWIDTH,
+	fprintf (stdrec, "%s %*s %.*s\n", modes, ugswidth + DATEWIDTH,
 		 _("Creating directory:"), length, pathname);
     }
 }
diff -ru tar-1.12/src/names.c tar-1.12.1/src/names.c
--- tar-1.12/src/names.c	Tue Apr 22 07:35:50 1997
+++ tar-1.12.1/src/names.c	Fri Jul  3 12:46:24 1998
@@ -332,6 +332,14 @@
 	    FATAL_ERROR ((0, errno, _("Cannot change to directory %s"),
 			  name_buffer));
 	  chdir_flag = 0;
+          if ( record_file_name )
+            {
+              char *d = malloc(PATH_MAX);
+              if( d && getcwd(d,PATH_MAX) )
+                fprintf(stdrec,
+                    "loc             current directory is %s\n",
+                    d);
+            }
 	}
       else if (change_dirs && strcmp (name_buffer, "-C") == 0)
 	chdir_flag = 1;
diff -ru tar-1.12/src/tar.c tar-1.12.1/src/tar.c
--- tar-1.12/src/tar.c	Fri Apr 25 22:09:49 1997
+++ tar-1.12.1/src/tar.c	Tue Jul 28 15:44:57 1998
@@ -163,6 +163,7 @@
 #define SUFFIX_OPTION			15
 #define USE_COMPRESS_PROGRAM_OPTION	16
 #define VOLNO_FILE_OPTION		17
+#define OPTION_RECORD_FILE              18
 
 /* Some cleanup is being made in GNU tar long options.  Using old names is
    allowed for a while, but will also send a warning to stderr.  Take old
@@ -251,6 +252,7 @@
   {"read-full-records", no_argument, NULL, 'B'},
   /* FIXME: --partial-blocks might be a synonym for --read-full-records?  */
   {"record-number", no_argument, NULL, OBSOLETE_BLOCK_NUMBER},
+  {"record-file", required_argument, NULL, OPTION_RECORD_FILE},
   {"record-size", required_argument, NULL, RECORD_SIZE_OPTION},
   {"remove-files", no_argument, &remove_files_option, 1},
   {"rsh-command", required_argument, NULL, RSH_COMMAND_OPTION},
@@ -410,6 +412,7 @@
       --checkpoint      print directory names while reading the archive\n\
       --totals          print total bytes written while creating archive\n\
   -R, --block-number    show block number within archive with each message\n\
+      --record-file      print the record information to file, enable -R\n\
   -w, --interactive     ask for confirmation for every action\n\
       --confirmation    same as -w\n"),
 	     stdout);
@@ -754,6 +757,10 @@
 
 	block_number_option = 1;
 	break;
+
+      case OPTION_RECORD_FILE:
+        record_file_name = optarg ;
+        break;
 
       case 's':
 	/* Names to extr are sorted.  */
