GNU tar offers the option --checkpoint where a message should be printed each checkpointreached.

Question:: In what does --checkpoint measure?

My best guess is Bytes.

I wasn't able to find a hint in the man nor the info nor in GNU's documentation on tar.

The OS is Linux, I use Bash and I use tar (GNU tar) 1.26

share|improve this question
up vote 5 down vote accepted

From info tar:

The checkpoint facility is enabled using the following option:

--checkpoint[=N]: Schedule checkpoints before writing or reading each Nth record. The default value for N is 10.

So the default value for N is 10 records. But what is a record anyway?

In truth, the meaning of record above is not easily discerned. There are no hints or pointers in the checkpoint section of the info tar manual. Still if you go further on you'll eventually come to the section on blocks and blocking-factor.

The data in an archive is grouped into blocks, which are 512 bytes. Blocks are read and written in whole number multiples called records. The number of blocks in a record (i.e., the size of a record in units of 512 bytes) is called the blocking factor. The --blocking-factor=512-SIZE (-b 512-SIZE) option specifies the blocking factor of an archive. The default blocking factor is typically 20 (i.e., 10240 bytes), but can be specified at installation.

To find out the blocking factor of an existing archive, use tar --list --file=ARCHIVE-NAME. This may not work on some devices.

So each checkpoint record is so-many blocks. This is definable via GNU tar's -b or --blocking-factor=[recordsize] option. If you do:

tar --show-defaults

You should get output like:

--format=gnu -f- -b20 --quoting-style=escape --rmt-command=/usr/lib/tar/rmt

Which would indicate that one record is 20 blocks.

You can also directly specify the record size in terms of bytes like:

--record-size=SIZE[SUF] Instructs tar to use SIZE bytes per record when accessing the archive. The argument can be suffixed with a size suffix, e.g. --record-size=10K for 10 Kilobytes.

share|improve this answer
    
from the GNU Manual "the term member to refer only to the members of an archive" (-> gnu.org/software/tar/manual/tar.html#SEC3) and then… whatever. Confusing: Yes. Solved: Yes. Thanks! – erch Sep 2 '14 at 11:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.