Hello. Read the bsdtar manual page. Understood everything except the --check-links option. I would be very grateful if you explain to me in which cases it is necessary. If it does not, then please use an example of use. Thank you in advance.

PS I already asked this question on RutCode, but, as it seems to me, this question has the right to be here too.

    1 answer 1

    Simple English is written in man

    --check-links warn if number of hard links to the file on the filesystem mismatch the number of links recorded in the archive 

    This means that the file has other names besides the names in this tar in this file system.

    The fact is that in * nix a data set (file, table of contents, etc.) can have many true names (all equal). They are called hard links. This new name can be added with the ln command. It is impossible to distinguish them from the first name (obtained as a result of the open (), mkdir (), etc.) system call.

    In addition to them, you can name the file link (soft link). Links are created with the ln command with the -s key.

    • @avp, in man pages FreeBSD is written like this: Issue a warning message I translated this, but if it doesn’t make it difficult, please give an example of real use. - bsdmacs 5:26 pm
    • I also know about links, but I have no experience at all, so I’m interested in the example of real use of this function. - bsdmacs
    • Never used it. I suppose that if you want to make an archive in which the file tree should be stored as accurately as possible, this option will warn you that when restoring, not all the paths to the zipped files will be restored. - avp
    • Nevertheless thank you. - bsdmacs