Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to search a compressed archive? #1915

Closed
g666gle opened this issue Dec 1, 2019 · 3 comments
Closed

Is there a way to search a compressed archive? #1915

g666gle opened this issue Dec 1, 2019 · 3 comments
Assignees
Labels

Comments

@g666gle
Copy link

g666gle commented Dec 1, 2019

I am currently using tar to make an archive of many small files so there is more history for the compression. For example, I have "file.tar.zst" I'm curious if there is any possible way to search through the files without having to decompress the archive?

@Cyan4973
Copy link
Contributor

Cyan4973 commented Dec 2, 2019

Not that I'm aware of.
It can't be faster than searching though a non-compressed .tar file,
and as far as I know, -t and --list require a complete scan of the file.

@nabijaczleweli
Copy link

Well, to traverse the entire archive, you need to traverse the entire archive, but you can avoid writing it to disk like this zstd -d owo.tar.zst -c 2>/dev/null | tar -t, for example

@Cyan4973 Cyan4973 self-assigned this Dec 3, 2019
@Cyan4973
Copy link
Contributor

Cyan4973 commented Dec 6, 2019

I believe @nabijaczleweli answers this question quite cleanly.

@Cyan4973 Cyan4973 closed this as completed Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants