tar -cO | base64 output contains several hundred bytes of 'AAA' at the end [closed]

给你一囗甜甜゛ 提交于 2020-07-09 12:19:07

问题


The permissions in the directories in which I am working are frequently too convoluted to use scp efficiently, so to copy files/folders between ssh sessions I've decided to cobble together tar and base64 for a ghetto solution. However, for some reason I'm getting a bunch of As padding at the end of my files.

For example:

# tar -cO file1.txt file2.txt | hexdump -C
00000000  66 69 6c 65 31 2e 74 78  74 00 00 00 00 00 00 00  |file1.txt.......|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000060  00 00 00 00 30 30 30 30  36 34 34 00 30 30 30 30  |....0000644.0000|
00000070  30 30 30 00 30 30 30 30  30 30 30 00 30 30 30 30  |000.0000000.0000|
00000080  30 30 30 30 37 32 32 00  31 32 32 30 32 35 33 37  |0000722.12202537|
00000090  35 33 34 00 30 31 31 33  32 31 00 20 30 00 00 00  |534.011321. 0...|
000000a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000100  00 75 73 74 61 72 20 20  00 72 6f 6f 74 00 00 00  |.ustar  .root...|
00000110  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000120  00 00 00 00 00 00 00 00  00 72 6f 6f 74 00 00 00  |.........root...|
00000130  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200  4c 6f 72 65 6d 20 69 70  73 75 6d 20 64 6f 6c 6f  |Lorem ipsum dolo|
00000210  72 20 73 69 74 20 61 6d  65 74 2c 20 63 6f 6e 73  |r sit amet, cons|
00000220  65 63 74 65 74 75 72 20  61 64 69 70 69 73 63 69  |ectetur adipisci|
00000230  6e 67 20 65 6c 69 74 2e  20 49 6e 74 65 67 65 72  |ng elit. Integer|
00000240  20 67 72 61 76 69 64 61  20 73 63 65 6c 65 72 69  | gravida sceleri|
00000250  73 71 75 65 20 73 61 70  69 65 6e 20 69 64 20 61  |sque sapien id a|
00000260  64 69 70 69 73 63 69 6e  67 2e 20 46 75 73 63 65  |dipiscing. Fusce|
00000270  20 69 61 63 75 6c 69 73  20 70 65 6c 6c 65 6e 74  | iaculis pellent|
00000280  65 73 71 75 65 20 76 65  6e 65 6e 61 74 69 73 2e  |esque venenatis.|
00000290  20 41 65 6e 65 61 6e 20  70 6f 73 75 65 72 65 20  | Aenean posuere |
000002a0  71 75 61 6d 20 76 69 74  61 65 20 61 6c 69 71 75  |quam vitae aliqu|
000002b0  61 6d 20 73 63 65 6c 65  72 69 73 71 75 65 2e 20  |am scelerisque. |
000002c0  56 65 73 74 69 62 75 6c  75 6d 20 75 74 20 76 6f  |Vestibulum ut vo|
000002d0  6c 75 74 70 61 74 20 6a  75 73 74 6f 2e 20 44 6f  |lutpat justo. Do|
000002e0  6e 65 63 20 66 72 69 6e  67 69 6c 6c 61 20 65 73  |nec fringilla es|
000002f0  74 20 6e 69 73 6c 2c 20  73 65 64 20 6c 6f 62 6f  |t nisl, sed lobo|
00000300  72 74 69 73 20 76 65 6c  69 74 20 6d 6f 6c 65 73  |rtis velit moles|
00000310  74 69 65 20 69 64 2e 20  53 65 64 20 69 6d 70 65  |tie id. Sed impe|
00000320  72 64 69 65 74 20 73 65  6d 70 65 72 20 6d 61 75  |rdiet semper mau|
00000330  72 69 73 20 73 65 64 20  63 6f 6e 67 75 65 2e 20  |ris sed congue. |
00000340  45 74 69 61 6d 20 73 69  74 20 61 6d 65 74 20 6f  |Etiam sit amet o|
00000350  64 69 6f 20 76 65 68 69  63 75 6c 61 2c 20 63 6f  |dio vehicula, co|
00000360  6e 64 69 6d 65 6e 74 75  6d 20 74 75 72 70 69 73  |ndimentum turpis|
00000370  20 6e 6f 6e 2c 20 76 69  76 65 72 72 61 20 6e 75  | non, viverra nu|
00000380  6e 63 2e 20 53 75 73 70  65 6e 64 69 73 73 65 20  |nc. Suspendisse |
00000390  6c 61 6f 72 65 65 74 20  6d 61 73 73 61 20 65 67  |laoreet massa eg|
000003a0  65 74 20 74 6f 72 74 6f  72 20 73 61 67 69 74 74  |et tortor sagitt|
000003b0  69 73 2c 20 75 74 20 63  6f 6e 73 65 63 74 65 74  |is, ut consectet|
000003c0  75 72 20 6d 61 67 6e 61  20 74 65 6d 70 6f 72 2e  |ur magna tempor.|
000003d0  20 0a 00 00 00 00 00 00  00 00 00 00 00 00 00 00  | ...............|
000003e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000400  66 69 6c 65 32 2e 74 78  74 00 00 00 00 00 00 00  |file2.txt.......|
00000410  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000460  00 00 00 00 30 30 30 30  36 34 34 00 30 30 30 30  |....0000644.0000|
00000470  30 30 30 00 30 30 30 30  30 30 30 00 30 30 30 30  |000.0000000.0000|
00000480  30 30 30 31 33 34 37 00  31 32 32 30 32 35 33 37  |0001347.12202537|
00000490  35 36 32 00 30 31 31 33  32 37 00 20 30 00 00 00  |562.011327. 0...|
000004a0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000500  00 75 73 74 61 72 20 20  00 72 6f 6f 74 00 00 00  |.ustar  .root...|
00000510  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000520  00 00 00 00 00 00 00 00  00 72 6f 6f 74 00 00 00  |.........root...|
00000530  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000600  50 68 61 73 65 6c 6c 75  73 20 6c 6f 72 65 6d 20  |Phasellus lorem |
00000610  6d 65 74 75 73 2c 20 74  69 6e 63 69 64 75 6e 74  |metus, tincidunt|
00000620  20 73 69 74 20 61 6d 65  74 20 61 6c 69 71 75 61  | sit amet aliqua|
00000630  6d 20 61 63 2c 20 68 65  6e 64 72 65 72 69 74 20  |m ac, hendrerit |
00000640  65 74 20 61 6e 74 65 2e  20 43 75 72 61 62 69 74  |et ante. Curabit|
00000650  75 72 20 6c 61 63 69 6e  69 61 20 6e 69 73 69 20  |ur lacinia nisi |
00000660  75 74 20 6f 72 6e 61 72  65 20 63 6f 6e 64 69 6d  |ut ornare condim|
00000670  65 6e 74 75 6d 2e 20 41  6c 69 71 75 61 6d 20 65  |entum. Aliquam e|
00000680  72 61 74 20 76 6f 6c 75  74 70 61 74 2e 20 43 75  |rat volutpat. Cu|
00000690  6d 20 73 6f 63 69 69 73  20 6e 61 74 6f 71 75 65  |m sociis natoque|
000006a0  20 70 65 6e 61 74 69 62  75 73 20 65 74 20 6d 61  | penatibus et ma|
000006b0  67 6e 69 73 20 64 69 73  20 70 61 72 74 75 72 69  |gnis dis parturi|
000006c0  65 6e 74 20 6d 6f 6e 74  65 73 2c 20 6e 61 73 63  |ent montes, nasc|
000006d0  65 74 75 72 20 72 69 64  69 63 75 6c 75 73 20 6d  |etur ridiculus m|
000006e0  75 73 2e 20 44 6f 6e 65  63 20 66 65 75 67 69 61  |us. Donec feugia|
000006f0  74 2c 20 65 6e 69 6d 20  70 72 65 74 69 75 6d 20  |t, enim pretium |
00000700  69 61 63 75 6c 69 73 20  73 75 73 63 69 70 69 74  |iaculis suscipit|
00000710  2c 20 64 6f 6c 6f 72 20  6d 69 20 63 6f 6e 67 75  |, dolor mi congu|
00000720  65 20 6e 75 6e 63 2c 20  61 20 64 69 67 6e 69 73  |e nunc, a dignis|
00000730  73 69 6d 20 70 75 72 75  73 20 61 6e 74 65 20 73  |sim purus ante s|
00000740  65 64 20 74 65 6c 6c 75  73 2e 20 44 6f 6e 65 63  |ed tellus. Donec|
00000750  20 65 74 20 6e 69 62 68  20 6d 61 6c 65 73 75 61  | et nibh malesua|
00000760  64 61 2c 20 62 69 62 65  6e 64 75 6d 20 6e 69 73  |da, bibendum nis|
00000770  69 20 6e 6f 6e 2c 20 69  6d 70 65 72 64 69 65 74  |i non, imperdiet|
00000780  20 65 72 61 74 2e 20 4e  75 6c 6c 61 20 70 75 6c  | erat. Nulla pul|
00000790  76 69 6e 61 72 20 63 75  72 73 75 73 20 72 69 73  |vinar cursus ris|
000007a0  75 73 20 65 67 65 74 20  6d 61 74 74 69 73 2e 20  |us eget mattis. |
000007b0  4e 75 6c 6c 61 6d 20 6c  6f 62 6f 72 74 69 73 20  |Nullam lobortis |
000007c0  69 6e 74 65 72 64 75 6d  20 66 72 69 6e 67 69 6c  |interdum fringil|
000007d0  6c 61 2e 20 53 75 73 70  65 6e 64 69 73 73 65 20  |la. Suspendisse |
000007e0  6e 65 63 20 69 70 73 75  6d 20 64 61 70 69 62 75  |nec ipsum dapibu|
000007f0  73 2c 20 6d 6f 6c 6c 69  73 20 66 65 6c 69 73 20  |s, mollis felis |
00000800  69 64 2c 20 72 75 74 72  75 6d 20 61 6e 74 65 2e  |id, rutrum ante.|
00000810  20 46 75 73 63 65 20 66  61 63 69 6c 69 73 69 73  | Fusce facilisis|
00000820  20 6d 61 6c 65 73 75 61  64 61 20 6c 61 63 69 6e  | malesuada lacin|
00000830  69 61 2e 20 53 65 64 20  76 65 6e 65 6e 61 74 69  |ia. Sed venenati|
00000840  73 20 73 61 67 69 74 74  69 73 20 72 69 73 75 73  |s sagittis risus|
00000850  20 61 20 73 63 65 6c 65  72 69 73 71 75 65 2e 20  | a scelerisque. |
00000860  4d 61 75 72 69 73 20 62  6c 61 6e 64 69 74 20 65  |Mauris blandit e|
00000870  75 69 73 6d 6f 64 20 61  6c 69 71 75 61 6d 2e 20  |uismod aliquam. |
00000880  51 75 69 73 71 75 65 20  61 63 20 73 6f 6c 6c 69  |Quisque ac solli|
00000890  63 69 74 75 64 69 6e 20  6d 69 2c 20 71 75 69 73  |citudin mi, quis|
000008a0  20 76 75 6c 70 75 74 61  74 65 20 6f 64 69 6f 2e  | vulputate odio.|
000008b0  20 4e 75 6c 6c 61 6d 20  6d 61 6c 65 73 75 61 64  | Nullam malesuad|
000008c0  61 20 70 65 6c 6c 65 6e  74 65 73 71 75 65 20 6c  |a pellentesque l|
000008d0  6f 72 65 6d 20 73 65 64  20 75 6c 6c 61 6d 63 6f  |orem sed ullamco|
000008e0  72 70 65 72 2e 20 0a 00  00 00 00 00 00 00 00 00  |rper.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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==

I mean, this just seems like FAR too many zeroes. Does base64 encoding do something to sequential \0 bytes that I'm not aware of? And what's the deal with hexdump outputting those lines of simply *?

Edit

The full, working command is: tar -czOb 1 file1.txt file2.txt | base64 -w 0

Then you can copy the output, run base64 -d | tar -xzf -, paste the code in, hit enter and Ctrl+D, and your files have been moved.


回答1:


In the output from hexdump a line that is only a * means that those bytes that are omitted are just NUL.

Looking at the hexdump output from tar, it skips from 8f0 to 2800 bytes, which is 1f10 (or 7952) NUL bytes. That's where the AAAs come from.

As for tar producing all the NULs, that has to do with the block size. See Remove trailing null characters produced by tar.




回答2:


Base64 encoding does nothing to NULs... except encoding runs of them as AAAAA....

The * is hexdump telling you that all the data in there is the same. So yes, lots of NULs. Therefore lots of As.

Also, rsync.



来源:https://stackoverflow.com/questions/18221065/tar-co-base64-output-contains-several-hundred-bytes-of-aaa-at-the-end

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!