Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • @KamilMaciorowski thanks for your hints about dd usage! I learned something new! About answering the right question: The title indeed asks "how to force tar" but when reading the question text, it becomes clear, that OP actually wants an empty tar file and it should not matter how.
    – josch
    Commented Jan 15, 2019 at 6:58
  • I went ahead and edited the question. Commented Jan 15, 2019 at 7:30
  • "just a file with 10240 NUL bytes in it" source for that?
    – Mr. Roland
    Commented Apr 24, 2020 at 10:51
  • @Mr.Roland gnu.org/software/tar/manual/html_node/Standard.html "terminated by an end-of-archive entry, which consists of two 512 blocks of zero bytes" -- each block is 20 bytes and 512 times 20 is 10240
    – josch
    Commented Apr 25, 2020 at 11:19
  • Or as empirical evidence: tar --create --files-from /dev/null | wc -c will give a file with 10240 zeros.
    – josch
    Commented Apr 25, 2020 at 11:21