Encrypting and compressing2019 Community Moderator ElectionHow to decrypt a file from an encrypted tar archive without decrypting the entire archiveHow to check/test .tar.bz archives?Error handling with tar and keep-old-files optionHow can I encrypt a large file with OpenSSL using RSA keys?OpenSSL - how to encrypt files with AES keytar without preserving userHow to decrypt a file from an encrypted tar archive without decrypting the entire archiveHow to encrypt a file with private keyProper way to encrypt a .deb packageSolaris encrypt/decrypt similiar on Linux?OpenSSL: how to encrypt/decrypt?
infinitive telling the purpose
How to create a hard link to an inode (ext4)?
Grey hair or white hair
Is there an elementary proof that there are infinitely many primes that are *not* completely split in an abelian extension?
Accountant/ lawyer will not return my call
Why is this plane circling around the Lucknow airport every day?
Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?
Low budget alien movie about the Earth being cooked
Make a transparent 448*448 image
Virginia employer terminated employee and wants signing bonus returned
Can anyone help me with this trigonometric identity please? I need to prove that its true
Examples of a statistic that is not independent of sample's distribution?
Offered promotion but I'm leaving. Should I tell?
Why do different render engines generate different z pass?
What are some noteworthy "mic-drop" moments in math?
Fourth person (in Slavey language)
Aliens englobed the Solar System: will we notice?
Solving "Resistance between two nodes on a grid" problem in Mathematica
What to do when during a meeting client people start to fight (even physically) with each others?
Why does Captain Marvel assume the people on this planet know this?
Why is there a voltage between the mains ground and my radiator?
Is Gradient Descent central to every optimizer?
Is there an equal sign with wider gap?
Norms on fields
Encrypting and compressing
2019 Community Moderator ElectionHow to decrypt a file from an encrypted tar archive without decrypting the entire archiveHow to check/test .tar.bz archives?Error handling with tar and keep-old-files optionHow can I encrypt a large file with OpenSSL using RSA keys?OpenSSL - how to encrypt files with AES keytar without preserving userHow to decrypt a file from an encrypted tar archive without decrypting the entire archiveHow to encrypt a file with private keyProper way to encrypt a .deb packageSolaris encrypt/decrypt similiar on Linux?OpenSSL: how to encrypt/decrypt?
Is there a better way to compress and then encrypt files other than tar
followed by openssl
or gpg
?
tar openssl
|
show 2 more comments
Is there a better way to compress and then encrypt files other than tar
followed by openssl
or gpg
?
tar openssl
3
That depends. What are your requirements? How are you quantifying "best"? What tools do you have available? Have you considered any other options already that might be useful to mention?
– Greg Hewgill
Jul 14 '14 at 1:48
Haven't considered any others. It just needs to be basic encryption, where someone can't read the contents of the file, and preferably maintain a good compression ratio.
– user75027
Jul 14 '14 at 2:18
1
Generally the answer will be no. One of the core unix philosophies is "do one thing and do it well".tar -z
is a slight exception because it is a very common practice.
– Patrick
Jul 14 '14 at 4:19
1
Newertar
versions support xz compression (flag-J
) whose compression ratio is usually better than the more traditional gzip (-z
) or bzip2 (-j
) compression.
– jofel
Jul 14 '14 at 8:24
I've noticed thatxz
is excellent. I do remember downloading the kernel and it was zipped to about 1/7 of its original size. I guess I'lltar cvJf out.tar.xz file1 [file2...]
and then use gpg or openssl to encrypt it. I also notice that xz is very fast. How does it acheive better compression than bz2 and still be fast?
– user75027
Jul 14 '14 at 15:40
|
show 2 more comments
Is there a better way to compress and then encrypt files other than tar
followed by openssl
or gpg
?
tar openssl
Is there a better way to compress and then encrypt files other than tar
followed by openssl
or gpg
?
tar openssl
tar openssl
asked Jul 14 '14 at 1:22
user75027user75027
2832411
2832411
3
That depends. What are your requirements? How are you quantifying "best"? What tools do you have available? Have you considered any other options already that might be useful to mention?
– Greg Hewgill
Jul 14 '14 at 1:48
Haven't considered any others. It just needs to be basic encryption, where someone can't read the contents of the file, and preferably maintain a good compression ratio.
– user75027
Jul 14 '14 at 2:18
1
Generally the answer will be no. One of the core unix philosophies is "do one thing and do it well".tar -z
is a slight exception because it is a very common practice.
– Patrick
Jul 14 '14 at 4:19
1
Newertar
versions support xz compression (flag-J
) whose compression ratio is usually better than the more traditional gzip (-z
) or bzip2 (-j
) compression.
– jofel
Jul 14 '14 at 8:24
I've noticed thatxz
is excellent. I do remember downloading the kernel and it was zipped to about 1/7 of its original size. I guess I'lltar cvJf out.tar.xz file1 [file2...]
and then use gpg or openssl to encrypt it. I also notice that xz is very fast. How does it acheive better compression than bz2 and still be fast?
– user75027
Jul 14 '14 at 15:40
|
show 2 more comments
3
That depends. What are your requirements? How are you quantifying "best"? What tools do you have available? Have you considered any other options already that might be useful to mention?
– Greg Hewgill
Jul 14 '14 at 1:48
Haven't considered any others. It just needs to be basic encryption, where someone can't read the contents of the file, and preferably maintain a good compression ratio.
– user75027
Jul 14 '14 at 2:18
1
Generally the answer will be no. One of the core unix philosophies is "do one thing and do it well".tar -z
is a slight exception because it is a very common practice.
– Patrick
Jul 14 '14 at 4:19
1
Newertar
versions support xz compression (flag-J
) whose compression ratio is usually better than the more traditional gzip (-z
) or bzip2 (-j
) compression.
– jofel
Jul 14 '14 at 8:24
I've noticed thatxz
is excellent. I do remember downloading the kernel and it was zipped to about 1/7 of its original size. I guess I'lltar cvJf out.tar.xz file1 [file2...]
and then use gpg or openssl to encrypt it. I also notice that xz is very fast. How does it acheive better compression than bz2 and still be fast?
– user75027
Jul 14 '14 at 15:40
3
3
That depends. What are your requirements? How are you quantifying "best"? What tools do you have available? Have you considered any other options already that might be useful to mention?
– Greg Hewgill
Jul 14 '14 at 1:48
That depends. What are your requirements? How are you quantifying "best"? What tools do you have available? Have you considered any other options already that might be useful to mention?
– Greg Hewgill
Jul 14 '14 at 1:48
Haven't considered any others. It just needs to be basic encryption, where someone can't read the contents of the file, and preferably maintain a good compression ratio.
– user75027
Jul 14 '14 at 2:18
Haven't considered any others. It just needs to be basic encryption, where someone can't read the contents of the file, and preferably maintain a good compression ratio.
– user75027
Jul 14 '14 at 2:18
1
1
Generally the answer will be no. One of the core unix philosophies is "do one thing and do it well".
tar -z
is a slight exception because it is a very common practice.– Patrick
Jul 14 '14 at 4:19
Generally the answer will be no. One of the core unix philosophies is "do one thing and do it well".
tar -z
is a slight exception because it is a very common practice.– Patrick
Jul 14 '14 at 4:19
1
1
Newer
tar
versions support xz compression (flag -J
) whose compression ratio is usually better than the more traditional gzip (-z
) or bzip2 (-j
) compression.– jofel
Jul 14 '14 at 8:24
Newer
tar
versions support xz compression (flag -J
) whose compression ratio is usually better than the more traditional gzip (-z
) or bzip2 (-j
) compression.– jofel
Jul 14 '14 at 8:24
I've noticed that
xz
is excellent. I do remember downloading the kernel and it was zipped to about 1/7 of its original size. I guess I'll tar cvJf out.tar.xz file1 [file2...]
and then use gpg or openssl to encrypt it. I also notice that xz is very fast. How does it acheive better compression than bz2 and still be fast?– user75027
Jul 14 '14 at 15:40
I've noticed that
xz
is excellent. I do remember downloading the kernel and it was zipped to about 1/7 of its original size. I guess I'll tar cvJf out.tar.xz file1 [file2...]
and then use gpg or openssl to encrypt it. I also notice that xz is very fast. How does it acheive better compression than bz2 and still be fast?– user75027
Jul 14 '14 at 15:40
|
show 2 more comments
3 Answers
3
active
oldest
votes
tar
is the usual tool to bundle files. Plain tar
itself doesn't compress. There are separate tools such as gzip, bzip2 and xz (in increasing order of compression ratio on typical files) that compress one file. Many tar
implementation, including GNU tar (the normal implementation on Linux), can automatically compress with an option (-z
for gzip, -j
for bzip2, -J
for xz):
tar -cJf myarchive.tar.xz file1 file2 file3
To encrypt a file, use gpg. Create a key and associate it with your email address (GPG/PGP key identifiers usually contain an email address, though it is not necessary ). Encrypt your files, specifying your email as the recipient. To decrypt a file, you'll need to enter the passphrase to unlock your private key.
GPG also lets you encrypt a file with a password. This is less secure and less flexible. It's less flexible because you need to specify the password when encrypting (so for example you can't make unattended backups). It's less secure because the only security is the password, whereas key-based encryption splits the security between the password and the key.
Don't use the openssl
command line tool. It's a showcase for the OpenSSL library, not designed for production use. Although you can do some things with it (in particular, it does have all the primitives needed for a basic certification authority), it's hard to use correctly and it doesn't have all you need to do things right. Where GPG gives you a bicycle, OpenSSL gives you some metal rods of various sizes and a couple of rubber chambers (screws and pump not included). Use GPG.
I understand tar as a bundler and the methods of compression. gpg keys, however, are new to me. I don't exactly understand how to use it, although I do have a key. I think. I think I also have ssh keys.
– user75027
Jul 15 '14 at 16:43
This is what I was looking for to compress and encrypt with one command (usingtar
andgpg
in a pipe).
– CGFoX
Jan 19 at 19:49
add a comment |
You can use 7zip:
7z a -p -mhe=on stuff.7z MyStuff
^ ^ ^ ^ ^
| | | | `--- Files/directories to compress & encrypt.
| | | `--- Output filename
| | `--- Encrypt filenames
| `---- Use a password
`---- Add files to archive
It will prompt you for a password. Apparently it uses AES-256 for encryption and SHA-256 of the password and a counter repeated 512K times for key derivation.
Edit: This doesn't encrypt file names, so you may want to tar
everything first anyway.
Edit 2: Added -mhe=on
.
5
If you use7za
you can encrypt file names with-mhe=on
option.
– SilverlightFox
Jan 7 '17 at 19:53
add a comment |
So you can use 7zip encrypting file names too:
7z a -p -mhe=on stuff.7z MyStuff
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f144391%2fencrypting-and-compressing%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
tar
is the usual tool to bundle files. Plain tar
itself doesn't compress. There are separate tools such as gzip, bzip2 and xz (in increasing order of compression ratio on typical files) that compress one file. Many tar
implementation, including GNU tar (the normal implementation on Linux), can automatically compress with an option (-z
for gzip, -j
for bzip2, -J
for xz):
tar -cJf myarchive.tar.xz file1 file2 file3
To encrypt a file, use gpg. Create a key and associate it with your email address (GPG/PGP key identifiers usually contain an email address, though it is not necessary ). Encrypt your files, specifying your email as the recipient. To decrypt a file, you'll need to enter the passphrase to unlock your private key.
GPG also lets you encrypt a file with a password. This is less secure and less flexible. It's less flexible because you need to specify the password when encrypting (so for example you can't make unattended backups). It's less secure because the only security is the password, whereas key-based encryption splits the security between the password and the key.
Don't use the openssl
command line tool. It's a showcase for the OpenSSL library, not designed for production use. Although you can do some things with it (in particular, it does have all the primitives needed for a basic certification authority), it's hard to use correctly and it doesn't have all you need to do things right. Where GPG gives you a bicycle, OpenSSL gives you some metal rods of various sizes and a couple of rubber chambers (screws and pump not included). Use GPG.
I understand tar as a bundler and the methods of compression. gpg keys, however, are new to me. I don't exactly understand how to use it, although I do have a key. I think. I think I also have ssh keys.
– user75027
Jul 15 '14 at 16:43
This is what I was looking for to compress and encrypt with one command (usingtar
andgpg
in a pipe).
– CGFoX
Jan 19 at 19:49
add a comment |
tar
is the usual tool to bundle files. Plain tar
itself doesn't compress. There are separate tools such as gzip, bzip2 and xz (in increasing order of compression ratio on typical files) that compress one file. Many tar
implementation, including GNU tar (the normal implementation on Linux), can automatically compress with an option (-z
for gzip, -j
for bzip2, -J
for xz):
tar -cJf myarchive.tar.xz file1 file2 file3
To encrypt a file, use gpg. Create a key and associate it with your email address (GPG/PGP key identifiers usually contain an email address, though it is not necessary ). Encrypt your files, specifying your email as the recipient. To decrypt a file, you'll need to enter the passphrase to unlock your private key.
GPG also lets you encrypt a file with a password. This is less secure and less flexible. It's less flexible because you need to specify the password when encrypting (so for example you can't make unattended backups). It's less secure because the only security is the password, whereas key-based encryption splits the security between the password and the key.
Don't use the openssl
command line tool. It's a showcase for the OpenSSL library, not designed for production use. Although you can do some things with it (in particular, it does have all the primitives needed for a basic certification authority), it's hard to use correctly and it doesn't have all you need to do things right. Where GPG gives you a bicycle, OpenSSL gives you some metal rods of various sizes and a couple of rubber chambers (screws and pump not included). Use GPG.
I understand tar as a bundler and the methods of compression. gpg keys, however, are new to me. I don't exactly understand how to use it, although I do have a key. I think. I think I also have ssh keys.
– user75027
Jul 15 '14 at 16:43
This is what I was looking for to compress and encrypt with one command (usingtar
andgpg
in a pipe).
– CGFoX
Jan 19 at 19:49
add a comment |
tar
is the usual tool to bundle files. Plain tar
itself doesn't compress. There are separate tools such as gzip, bzip2 and xz (in increasing order of compression ratio on typical files) that compress one file. Many tar
implementation, including GNU tar (the normal implementation on Linux), can automatically compress with an option (-z
for gzip, -j
for bzip2, -J
for xz):
tar -cJf myarchive.tar.xz file1 file2 file3
To encrypt a file, use gpg. Create a key and associate it with your email address (GPG/PGP key identifiers usually contain an email address, though it is not necessary ). Encrypt your files, specifying your email as the recipient. To decrypt a file, you'll need to enter the passphrase to unlock your private key.
GPG also lets you encrypt a file with a password. This is less secure and less flexible. It's less flexible because you need to specify the password when encrypting (so for example you can't make unattended backups). It's less secure because the only security is the password, whereas key-based encryption splits the security between the password and the key.
Don't use the openssl
command line tool. It's a showcase for the OpenSSL library, not designed for production use. Although you can do some things with it (in particular, it does have all the primitives needed for a basic certification authority), it's hard to use correctly and it doesn't have all you need to do things right. Where GPG gives you a bicycle, OpenSSL gives you some metal rods of various sizes and a couple of rubber chambers (screws and pump not included). Use GPG.
tar
is the usual tool to bundle files. Plain tar
itself doesn't compress. There are separate tools such as gzip, bzip2 and xz (in increasing order of compression ratio on typical files) that compress one file. Many tar
implementation, including GNU tar (the normal implementation on Linux), can automatically compress with an option (-z
for gzip, -j
for bzip2, -J
for xz):
tar -cJf myarchive.tar.xz file1 file2 file3
To encrypt a file, use gpg. Create a key and associate it with your email address (GPG/PGP key identifiers usually contain an email address, though it is not necessary ). Encrypt your files, specifying your email as the recipient. To decrypt a file, you'll need to enter the passphrase to unlock your private key.
GPG also lets you encrypt a file with a password. This is less secure and less flexible. It's less flexible because you need to specify the password when encrypting (so for example you can't make unattended backups). It's less secure because the only security is the password, whereas key-based encryption splits the security between the password and the key.
Don't use the openssl
command line tool. It's a showcase for the OpenSSL library, not designed for production use. Although you can do some things with it (in particular, it does have all the primitives needed for a basic certification authority), it's hard to use correctly and it doesn't have all you need to do things right. Where GPG gives you a bicycle, OpenSSL gives you some metal rods of various sizes and a couple of rubber chambers (screws and pump not included). Use GPG.
answered Jul 15 '14 at 12:45
GillesGilles
542k12810961615
542k12810961615
I understand tar as a bundler and the methods of compression. gpg keys, however, are new to me. I don't exactly understand how to use it, although I do have a key. I think. I think I also have ssh keys.
– user75027
Jul 15 '14 at 16:43
This is what I was looking for to compress and encrypt with one command (usingtar
andgpg
in a pipe).
– CGFoX
Jan 19 at 19:49
add a comment |
I understand tar as a bundler and the methods of compression. gpg keys, however, are new to me. I don't exactly understand how to use it, although I do have a key. I think. I think I also have ssh keys.
– user75027
Jul 15 '14 at 16:43
This is what I was looking for to compress and encrypt with one command (usingtar
andgpg
in a pipe).
– CGFoX
Jan 19 at 19:49
I understand tar as a bundler and the methods of compression. gpg keys, however, are new to me. I don't exactly understand how to use it, although I do have a key. I think. I think I also have ssh keys.
– user75027
Jul 15 '14 at 16:43
I understand tar as a bundler and the methods of compression. gpg keys, however, are new to me. I don't exactly understand how to use it, although I do have a key. I think. I think I also have ssh keys.
– user75027
Jul 15 '14 at 16:43
This is what I was looking for to compress and encrypt with one command (using
tar
and gpg
in a pipe).– CGFoX
Jan 19 at 19:49
This is what I was looking for to compress and encrypt with one command (using
tar
and gpg
in a pipe).– CGFoX
Jan 19 at 19:49
add a comment |
You can use 7zip:
7z a -p -mhe=on stuff.7z MyStuff
^ ^ ^ ^ ^
| | | | `--- Files/directories to compress & encrypt.
| | | `--- Output filename
| | `--- Encrypt filenames
| `---- Use a password
`---- Add files to archive
It will prompt you for a password. Apparently it uses AES-256 for encryption and SHA-256 of the password and a counter repeated 512K times for key derivation.
Edit: This doesn't encrypt file names, so you may want to tar
everything first anyway.
Edit 2: Added -mhe=on
.
5
If you use7za
you can encrypt file names with-mhe=on
option.
– SilverlightFox
Jan 7 '17 at 19:53
add a comment |
You can use 7zip:
7z a -p -mhe=on stuff.7z MyStuff
^ ^ ^ ^ ^
| | | | `--- Files/directories to compress & encrypt.
| | | `--- Output filename
| | `--- Encrypt filenames
| `---- Use a password
`---- Add files to archive
It will prompt you for a password. Apparently it uses AES-256 for encryption and SHA-256 of the password and a counter repeated 512K times for key derivation.
Edit: This doesn't encrypt file names, so you may want to tar
everything first anyway.
Edit 2: Added -mhe=on
.
5
If you use7za
you can encrypt file names with-mhe=on
option.
– SilverlightFox
Jan 7 '17 at 19:53
add a comment |
You can use 7zip:
7z a -p -mhe=on stuff.7z MyStuff
^ ^ ^ ^ ^
| | | | `--- Files/directories to compress & encrypt.
| | | `--- Output filename
| | `--- Encrypt filenames
| `---- Use a password
`---- Add files to archive
It will prompt you for a password. Apparently it uses AES-256 for encryption and SHA-256 of the password and a counter repeated 512K times for key derivation.
Edit: This doesn't encrypt file names, so you may want to tar
everything first anyway.
Edit 2: Added -mhe=on
.
You can use 7zip:
7z a -p -mhe=on stuff.7z MyStuff
^ ^ ^ ^ ^
| | | | `--- Files/directories to compress & encrypt.
| | | `--- Output filename
| | `--- Encrypt filenames
| `---- Use a password
`---- Add files to archive
It will prompt you for a password. Apparently it uses AES-256 for encryption and SHA-256 of the password and a counter repeated 512K times for key derivation.
Edit: This doesn't encrypt file names, so you may want to tar
everything first anyway.
Edit 2: Added -mhe=on
.
edited Sep 21 '18 at 12:34
answered Nov 24 '16 at 14:58
TimmmmTimmmm
262311
262311
5
If you use7za
you can encrypt file names with-mhe=on
option.
– SilverlightFox
Jan 7 '17 at 19:53
add a comment |
5
If you use7za
you can encrypt file names with-mhe=on
option.
– SilverlightFox
Jan 7 '17 at 19:53
5
5
If you use
7za
you can encrypt file names with -mhe=on
option.– SilverlightFox
Jan 7 '17 at 19:53
If you use
7za
you can encrypt file names with -mhe=on
option.– SilverlightFox
Jan 7 '17 at 19:53
add a comment |
So you can use 7zip encrypting file names too:
7z a -p -mhe=on stuff.7z MyStuff
add a comment |
So you can use 7zip encrypting file names too:
7z a -p -mhe=on stuff.7z MyStuff
add a comment |
So you can use 7zip encrypting file names too:
7z a -p -mhe=on stuff.7z MyStuff
So you can use 7zip encrypting file names too:
7z a -p -mhe=on stuff.7z MyStuff
answered Mar 19 '18 at 21:12
VictorVictor
311
311
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f144391%2fencrypting-and-compressing%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
-openssl, tar
3
That depends. What are your requirements? How are you quantifying "best"? What tools do you have available? Have you considered any other options already that might be useful to mention?
– Greg Hewgill
Jul 14 '14 at 1:48
Haven't considered any others. It just needs to be basic encryption, where someone can't read the contents of the file, and preferably maintain a good compression ratio.
– user75027
Jul 14 '14 at 2:18
1
Generally the answer will be no. One of the core unix philosophies is "do one thing and do it well".
tar -z
is a slight exception because it is a very common practice.– Patrick
Jul 14 '14 at 4:19
1
Newer
tar
versions support xz compression (flag-J
) whose compression ratio is usually better than the more traditional gzip (-z
) or bzip2 (-j
) compression.– jofel
Jul 14 '14 at 8:24
I've noticed that
xz
is excellent. I do remember downloading the kernel and it was zipped to about 1/7 of its original size. I guess I'lltar cvJf out.tar.xz file1 [file2...]
and then use gpg or openssl to encrypt it. I also notice that xz is very fast. How does it acheive better compression than bz2 and still be fast?– user75027
Jul 14 '14 at 15:40