Unix & Linux Asked by user216488 on January 5, 2022
I have a personal archive of many files (more than 12Go)
I want to encrypt it with a password, then divide it into 100 parts.
How can I do so?
And how can I regroup it and de-encrypt it to get the files back?
If any of the 100 parts are lost/corrupted you could end up being unable to recover any files, I'd lean more towards 100 separate archives each encrypted.
But, with one giant split file you may end up needing 12Go (Gigabytes?) of free space to re-assemble the pieces, and another 12 to decrypt/view the archive, if your tools don't support pipeing with stdin/stdout.
Using tar & gpg & split together should work, like:
tar -c files | gpg -o- ... | split -b [size 1/100th of total] -
Options for split that might be useful may include:
-a3
generate suffixes of length N (default 2)-d
use numeric suffixes instead of alphabetic.-
read standard input.outputfilename.
name of output filesAnswered by Xen2050 on January 5, 2022
To encrypt the file use openssl
:
openssl aes-128-cbc -in the_archive -out the_archive.crypted
To split the file use split
:
split -a 3 -b 100000 the_archived.crypted chunk.
To regroup the chunks use cat
:
cat chunk.??? >the_archive.crypted
To decode the file use openssl
again:
openssl aes-128-cbc -d -in the_archive.crypted -out the_archive
Answered by kmkaplan on January 5, 2022
3 Asked on December 1, 2021
1 Asked on November 28, 2021 by crissilvaeng
3 Asked on November 28, 2021
1 Asked on November 28, 2021 by laur
1 Asked on November 28, 2021
2 Asked on November 28, 2021 by e77x
1 Asked on November 28, 2021 by rktkz
1 Asked on November 28, 2021 by ritesh
3 Asked on November 28, 2021 by adam-pickering
2 Asked on November 28, 2021 by z-bird
1 Asked on November 28, 2021 by kokizzu
2 Asked on November 28, 2021 by aardbol
0 Asked on November 28, 2021
4 Asked on November 28, 2021 by swaroop-joshi
0 Asked on November 28, 2021
1 Asked on November 26, 2021 by c0ldplasma
Get help from others!
Recent Answers
Recent Questions
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP