|
|
|
|
|
by mzs
2559 days ago
|
|
$ echo /dev/urandom | cpio -o | xxd -a
1 block
00000000: 3037 3037 3037 3737 3737 3737 3030 3030 0707077777770000
00000010: 3031 3032 3036 3636 3030 3030 3030 3030 0102066600000000
00000020: 3030 3030 3030 3030 3031 3737 3737 3737 0000000001777777
00000030: 3133 3436 3430 3530 3035 3730 3030 3031 1346405005700001
00000040: 3530 3030 3030 3030 3030 3030 2f64 6576 500000000000/dev
00000050: 2f75 7261 6e64 6f6d 0030 3730 3730 3730 /urandom.0707070
00000060: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
00000070: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
00000080: 3030 3130 3030 3030 3030 3030 3030 3030 0010000000000000
00000090: 3030 3030 3030 3030 3133 3030 3030 3030 0000000013000000
000000a0: 3030 3030 3054 5241 494c 4552 2121 2100 00000TRAILER!!!.
000000b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
*
000001f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
$ echo $?
0
|
|
From `man 5 cpio`:
> The end of the archive is indicated by a special record with the pathname “TRAILER!!!”.
This makes me wonder if this means that the cpio format can't reliably be used for files with the path "TRAILER!!!". Why would the format even need a special record to indicate the end of the archive? Is there any reason why one wouldn't be able to rely on the end of the file to indicate the end of the archive?