tar: Exec Mode

1 
1 F.3 Exec Mode
1 =============
1 
1 This mode is designed for testing the behavior of 'paxutils' commands
1 when some of the files change during archiving.  It is an experimental
1 mode.
1 
1    The 'Exec Mode' is toggled by '--run' command line option (or its
1 alias '-r').  The non-optional arguments to 'getopt' give the command
1 line to be executed.  Normally, it should contain at least the
1 '--checkpoint' option.
1 
1    A set of options is provided for defining checkpoint values and
1 actions to be executed upon reaching them.  Checkpoint values are
1 introduced with the '--checkpoint' command line option.  Argument to
1 this option is the number of checkpoint in decimal.
1 
1    Any number of "actions" may be specified after a checkpoint.
1 Available actions are
1 
1 '--cut FILE'
1 '--truncate FILE'
1      Truncate FILE to the size specified by previous '--length' option
1      (or 0, if it is not given).
1 
1 '--append FILE'
1      Append data to FILE.  The size of data and its pattern are given by
1      previous '--length' and 'pattern' options.
1 
1 '--touch FILE'
1      Update the access and modification times of FILE.  These timestamps
1      are changed to the current time, unless '--date' option was given,
1      in which case they are changed to the specified time.  Argument to
1      '--date' option is a date specification in an almost arbitrary
1      format (⇒Date input formats).
1 
1 '--exec COMMAND'
1      Execute given shell command.
1 
1 '--delete FILE'
1 '--unlink FILE'
1      Delete the named file or directory.  If deleting the directory, it
1      must be empty.
1 
1    Option '--verbose' instructs 'genfile' to print on standard output
1 notifications about checkpoints being executed and to verbosely describe
1 exit status of the command.
1 
1    While the command is being executed its standard output remains
1 connected to descriptor 1.  All messages it prints to file descriptor 2,
1 except checkpoint notifications, are forwarded to standard error.
1 
1    'Genfile' exits with the exit status of the executed command.
1 
1    For compatibility with previous 'genfile' versions, the '--run'
1 option takes an optional argument.  If used this way, its argument
1 supplies the command line to be executed.  There should be no
1 non-optional arguments in the 'genfile' command line.
1 
1    The actual command line is constructed by inserting the
1 '--checkpoint' option between the command name and its first argument
1 (if any).  Due to this, the argument to '--run' may not use traditional
1 'tar' option syntax, i.e., the following is wrong:
1 
1      # Wrong!
1      genfile --run='tar cf foo bar'
1 
1 
1    Use the following syntax instead:
1 
1      genfile --run='tar -cf foo bar' ACTIONS...
1 
1    The above command line is equivalent to
1 
1      genfile ACTIONS... -- tar -cf foo bar
1 
1    Notice, that the use of compatibility mode is deprecated.
1