Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a tar file that is 11.5 GB large. I want to copy it to a DVD disk. Therefore at present it is too large. It is a tar file created with the command;:
tar -cf works Desktop
which put all of the files on the desktop (plus subdirectories). Now I do not think it is compressed, so can I use a command to now compress this tar file? if so what is the command.
I could start over creating gzipped tar files from scratch, but these tar files have been checked and approved by our network so that would make it a much longer process, if I went through thta again.
jyunker, unlikely you are able to compress 11.5 GB to fit into DVD (unless all of that is text). In order to compress your TAR file, use "xz":
Code:
xz file.tar
This will take a lot of time. But instead you might want to consider splitting your tar archive to fit it into three DVDs:
Code:
split -b 4500M file.tar file.tar.
This will split "file.tar" into 4500Mb-parts and name them "file.tar.aa", "file.tar.ab", "file.tar.ac" and so on... Don't forget about period in the very end of the command (it will make extension visible for you). Then, in order to assemble files into source one, `cat` them like this:
How much you can compress that tar-archive is dependent on its content. If it is mostly text then you will get very good compression rates. If it is images or videos you will likely end with a larger file after compression, since those files usually are already compressed and compressing them again does nothing but adding overhead. But as Mr. Alex already pointed out, splitting the file may be the better option. Also, keep in mind that you can control the level of compression, a xz -9 will use better compression techniques, but will be significantly slower, while a xz -1 will go faster, but result in a larger file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.