tar: nul

1 
1 6.3.1 'NUL'-Terminated File Names
1 ---------------------------------
1 
1 The '--null' option causes '--files-from=FILE-OF-NAMES' ('-T
1 FILE-OF-NAMES') to read file names terminated by a 'NUL' instead of a
1 newline, so files whose names contain newlines can be archived using
1 '--files-from'.
1 
1 '--null'
1      Only consider 'NUL'-terminated file names, instead of files that
1      terminate in a newline.
1 
1 '--no-null'
1      Undo the effect of any previous '--null' option.
1 
1    The '--null' option is just like the one in GNU 'xargs' and 'cpio',
1 and is useful with the '-print0' predicate of GNU 'find'.  In 'tar',
1 '--null' also disables special handling for file names that begin with
1 dash (similar to '--verbatim-files-from' option).
1 
1    This example shows how to use 'find' to generate a list of files
1 larger than 800K in length and put that list into a file called
1 'long-files'.  The '-print0' option to 'find' is just like '-print',
1 except that it separates files with a 'NUL' rather than with a newline.
1 You can then run 'tar' with both the '--null' and '-T' options to
1 specify that 'tar' gets the files from that file, 'long-files', to
1 create the archive 'big.tgz'.  The '--null' option to 'tar' will cause
1 'tar' to recognize the 'NUL' separator between files.
1 
1      $ find . -size +800 -print0 > long-files
1      $ tar -c -v --null --files-from=long-files --file=big.tar
1 
1    The '--no-null' option can be used if you need to read both
1 'NUL'-terminated and newline-terminated files on the same command line.
1 For example, if 'flist' is a newline-terminated file, then the following
1 command can be used to combine it with the above command:
1 
1      $ find . -size +800 -print0 |
1        tar -c -f big.tar --null -T - --no-null -T flist
1 
1    This example uses short options for typographic reasons, to avoid
1 very long lines.
1 
1    GNU 'tar' is tries to automatically detect 'NUL'-terminated file
1 lists, so in many cases it is safe to use them even without the '--null'
1 option.  In this case 'tar' will print a warning and continue reading
1 such a file as if '--null' were actually given:
1 
1      $ find . -size +800 -print0 | tar -c -f big.tar -T -
1      tar: -: file name read contains nul character
1 
1    The null terminator, however, remains in effect only for this
1 particular file, any following '-T' options will assume newline
1 termination.  Of course, the null autodetection applies to these
1 eventual surplus '-T' options as well.
1