You are not logged in.

#1 2020-07-28 21:08:50

kev717
Member
Registered: 2011-06-08
Posts: 56

How do I get zstd to place files in new directory using -r?

I'd like to run something like
zstd -rz /path/to/big/files
and have it place the new compressed files in /path/to/small/files while maintaining directory structure.  Is this possible?

Last edited by kev717 (2020-07-28 21:09:22)

Offline

#2 2020-07-28 21:41:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 23,934
Website

Re: How do I get zstd to place files in new directory using -r?

I don't think so.  zstd has an option for an output target directory but it doesn't build subdirs but instead puts every compressed file in the same directory.  Just loop through the files running zstd on each specifying the proper output location.

Last edited by Trilby (2020-07-29 11:58:56)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#3 2020-07-29 05:00:52

waitnsea
Member
From: France
Registered: 2013-02-10
Posts: 39

Re: How do I get zstd to place files in new directory using -r?

Edit : Sorry - comprehension error

Last edited by waitnsea (2020-07-29 13:21:30)

Offline

#4 2020-07-29 11:59:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 23,934
Website

Re: How do I get zstd to place files in new directory using -r?

Was that a question for me?  I don't see any relevance of tar or the linked thread to this topic.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#5 2020-07-29 20:21:01

Cyan
Member
Registered: 2014-01-12
Posts: 2

Re: How do I get zstd to place files in new directory using -r?

kev717 wrote:

I'd like to run something like
zstd -rz /path/to/big/files
and have it place the new compressed files in /path/to/small/files while maintaining directory structure.  Is this possible?

`--output-dir-mirror DIR`

This functionality is only present in the development version of `zstd`.

Offline

#6 2020-07-29 20:25:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 23,934
Website

Re: How do I get zstd to place files in new directory using -r?

Nice Cyan.  The fact that this was a planned feature makes the current version man page entry make a lot more sense: --output-dir-flat just seemed like a very odd option name when there wasn't an alternative.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

Board footer

Powered by FluxBB