![]() ![]() Once again, all of the filenames are in blue, indicating compression. If we look inside that folder, we see that all the files are compressed as well. You can tell it’s compressed by Windows because the folder name is displayed in blue instead of black. Here’s how a folder that has been compressed is displayed in Windows File Explorer. ![]() You may find yourself with compressed files if you’ve updated systems from older versions of Windows, or if you manually enabled compression at some point in the past. However, file compression is still supported. That’s no longer present in current versions of Windows. Once upon a time, Windows would offer to compress “old” files as part of the disk cleanup tool. Compressed filesįile compression uses various algorithms to reduce the physical space taken up by a file without loss of any information. There’s also a command-line approach to compressing and decompressing files.Decompressing files is done in Windows File Explorer.Windows no longer offers to compress old files, though compression remains available.You'd end up with containing many (uncompressed) db-*.tar files. This is slightly less efficient in terms of the final compressed size because there are extra tar headers in the stream, but saves some time on extracting and re-adding all the files as files. This would look something like: tar cJf dummy-file They will compress (almost) exactly as well as their contents in a single file, and it will reduce the compression overhead for each file. Note that - depending on what exactly you want - just adding the uncompressed tar files themselves to an archive might suffice. ![]() You do a lot of excess decompression and recompression that will make this slower than the cat versions, but the resulting archive will work anywhere without any special support. The compression is streaming just like it would have been had you made the final archive all at once, so it will be as good as it ever could have been. This only ever extracts a single archive at a time, so the working space is limited to the size of a single archive's contents. If archives that only work with a particular tar implementation aren't adequate for your purposes, appending to the archive with r is your friend: tar cJf dummy-file Otherwise this will give you what you want - piping the output through xz is how tar compresses its output anyway. If there are files that appear more than once in different tar files, this won't work properly, but you've got that problem regardless. You can build something up to trick it into working using process substitution, but it's a hassle and even more fragile. That has the same limitations as above - you must use -ignore-zeros to extract - but it doesn't work with compressed archives. GNU tar also supports a -concatenate mode for producing combined archives. ![]() Other than that, though, everything will work correctly. To extract, you'll have to use the -ignore-zeros option (in GNU tar), because the archives do have an "end-of-file" marker that will appear in the middle of the result. You can decompress (only) the files, concatenate them together, and recompress that stream: xzcat *.tar.xz | xz -c > Ĭ will be a compressed tarball of all the files in the component tarballs that is only slightly corrupt. Since tar files are a streaming format - you can cat two of them together and get an almost-correct result - you don't need to extract them to disk at all to do this. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |