Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As the title states, I have a few large archives (currently in .7z and .tar.gz format) stored on a remote location which I access via sshfs. I often find myself needing to extract one or two files from these archives and the default archive manager in ubuntu seems to extract/read the whole file in the background first before I get the file I want.

I'd like a list of the possible formats that does not do this. In other words, I'd like to be able to extract a file from a large archive without any delay.

share|improve this question
    
I don't think this is possible, the contents have to be extracted somewhere, at least to a temporary folder so they can be read by the archive manager, close the compressed file and the temp folder disappears. – Uri Herrera Jun 12 '13 at 22:05
up vote 1 down vote accepted

zip, 7zip, and dar ( in non solid mode ) have this property. They do this by storing a table of contents and compressing in smaller blocks so only the blocks containing the files you want to extract need to be decompressed. This does result in slightly less compression though.

share|improve this answer
    
I guess zip is the way then. Thanks! – Rey Leonard Amorato Jun 26 '13 at 10:30
    
I am pretty sure that my 7z (7zip) archives are extracted completly. So how to set / use this property? – Thorsten Niehues Dec 2 '15 at 9:13
    
@ThorstenNiehues, by specifying that only certain files should be extracted instead of everything. – psusi Dec 2 '15 at 22:56
    
In 7zip GUI (Windows) I extract only selected folders / files. But the extractions takes a long time. So I suspect that everything is extracted in the background. How to verify the extraction process / check if extraction of parts is possible? – Thorsten Niehues Dec 3 '15 at 8:23
    
@ThorstenNiehues, the fact that it is taking a long time to extract a small file near the end means that it is a solid archive, and so the entire thing must be decompressed from the beginning to get to the file you asked for. – psusi Dec 4 '15 at 1:11

It's has become regulation in every UNIX and Unix-like platforms. Because UNIX's philosophy that application must attempt to complete single task perfectly. So there's no one applications that brings archiving and compression together.

The advantage, you can combine one archiving application with any compression applications. Example combining tar with gzip (tar.gz) and tar with lzma (tar.lz).

Maybe propiertary applications provide what you want such as WinZIP, but it only available for another paid UNIX (OS X)

share|improve this answer
    
You can use zip files just fine in Ubuntu. – psusi Jun 13 '13 at 2:07

I don't know of anything which meets all of your requirements. However, I might have something which will still work

If your needs are read-mostly, instead of creating a compressed archive (eg. tar.gz), consider creating a SquashFS image instead. SquashFS is a read-only compressed filesystem. You would then be able to access that image file via sshfs and mount that as a loopback device.

Since this is a complete filesystem, directory traversal, data access, etc. will be limited to only the particular blocks required.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.