August 13, 20169 yr As a preface, I'm basically brand new to linux and learning as I go. Mostly googling my way around at the moment. I'm currently in a situation where I want to be able to compress a directory on the unraid server and then import it to my windows machine and decompress it(using 7zip for now). I'm using the following command: tar cv -C /mnt/user/Backup/Test . | xz -2vzf --threads=0 > /mnt/user/media/test This is to take a folder from backup and create the .xz on the media share. The actual shares and file names are just temporary to make sure the function is working before I start doing my large real files. This command works but it literally wraps every single file, so when I start unzipping on my windows machine, I have to go through and unzip the directory, then the file inside etc. I'm used to non tar stuff where you just unzip the original file and everything is open and available from there. I tried messing around without tar'ing it first, but this seems to be mandatory as xz complains the target is a directory otherwise. How can I go about achieving a normal compression structure, as I'm accustom to in windows? Or alternatively how can I decompress this on windows without having to manually extract each and every directory/subdirectory/file etc?
August 14, 20169 yr Author For the sake of learning, could anyone share with me why that above string was causing each file to be independently wrapped?
August 14, 20169 yr that's how tarballs (that's what the older unix people call them) are. tar is literally a tape archive which is just all the file concatenated together into a single large file (the .tar) which is how it would be written to tap. This archive is then compressed into a large single file archive (xz in your particular case) I think the canonical extension for tar balls are: * tar.Z (compress) * tar.gz (Gzip) * tar.bz2 (Bzip) * tar.xz (xz) but due to DOS semantics, they became * tar.z ( unchanged since there is no uncompress outside of Unix) * tgz * tbz * txz
August 14, 20169 yr Author Ah thanks for the info. I'll need to research a bit more on how to effectively handle them in a windows environment then
August 14, 20169 yr Community Expert Ah thanks for the info. I'll need to research a bit more on how to effectively handle them in a windows environment then 7zip
Archived
This topic is now archived and is closed to further replies.