In the "Why Xar" page of the Xar google code page it says:
"Additionally, this means xar can use different compression methods for
each file in the archive.
I would like to compress a text file using gzip command line tool while keeping the original file. By default running the following command
gzip file.txt
results in modifying this file and renaming it file.txt.gz. instead of this behavior I would like to have this new compressed file in addition to the existing one file.txt.
When using the compress mount option, there's usually a message in dmesg with btrfs recognizing that compression is enabled.I guess one way to confirm compression is enabled is to do something likedd if=/dev/zero of=file bs=1M count=1024
btrfs fi sync /btrfsmountpoint
du -h file then check the file size.Also, I think it should be lzo and not Lzo.
How can I ensure the folder that I tar and compress is good to be archive in DVD or tape? Must I uncompress and untar the file, or there is any way to tell the integerity of the compressed file before send to archive? I have bad experience on this, which the archive compressed file cold not be opened, the error message is unexpected EOF. I guess it could be incomplete archive process.
Or zip VS gzip VS bzip2 VS xz
In a previous article about the tar program I mentioned gzip and bzip2 compression methods as options to create a tarball (and I forgot xz).
To make amends today I will introduce the main methods to compress the file and I’ll do some tests to see how they behave.
You may at times need to create a series of small compress files for a big file ( for instance, when you want to upload a very big file to Mediafire or Rapidshare, you will need to split this file into small parts). In Windows, the most popular tool for this task is WinRar to create rar files. In Linux, you can use the rar utility to compress a big file then split in into small parts as well.
From my tests so far on OSX 10.8 and CentOS 5.5, it looks like tar automatically deduces the compression type of an archive, i.e., I could do tar -xf <compressed archive> instead of doing tar -jxf <bzip2 compressed archive> or tar -zxf <gzip compressed archive>.
I would like to know if I can depend on this automatic compression detection feature of tar, or is this feature new?
When I compress files, I expect two basic options. None of which are present in Nautilus's "compress..." context menu action, and instead there is only option to set password. So thought to ask for some solution if someone has already solved this nicely.
Most important to me:
1 - compression level
Because often I just want to store files fast.
How to mount compressed disk image?
Here is my situation: I have hard drive with (fresh) OS installation. I made compressed image of that disk to another disk.
How to make compressed disk image to file (on another disk):
sudo cat /dev/sdb | gzip > disk.img.gz (sdb is source)
If free space is zero-ed, compression is much better.