3 ms·
Just pondered... there might be everything already be installed in a typical linux system, "split" does the right thing and can pipe into a command. Probably no
by cnvogel 11y ago
Just pondered... there might be everything already be installed in a typical linux system, "split" does the right thing and can pipe into a command. Probably not the most efficient (making several copies of the data), but certainly enough for a proof-of-concept.
$ dd if=/dev/urandom bs=1M | \
split -b5000000 -d -a4 --verbose \
--filter="gpg -e -r 0x6AC3E4EC >\$FILE" \
- recording_
executing with FILE=recording_0000
executing with FILE=recording_0001
executing with FILE=recording_0002
(...)
• -b500000 split at 50 megabyte input file size.
• -d decimal suffixes (0001, ... else aa..az..zz)
• -a4 : suffixes of length 4 (0000)
• --filter="" : filter through pgp, intended output file is in variable $FILE
• - : read stdin
• recording_ : prefix output files with this string
$ file *recor*
recording_0000: PGP RSA encrypted session key - keyid: 8F74FAFF 29C8C7C2 RSA (Encrypt or Sign) 2048b .
recording_0001: PGP RSA encrypted session key - keyid: 8F74FAFF 29C8C7C2 RSA (Encrypt or Sign) 2048b .
recording_0002: PGP RSA encrypted session key - keyid: 8F74FAFF 29C8C7C2 RSA (Encrypt or Sign) 2048b .
(....)