Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
That is the correct command to use, to compress a file.
However, sometimes, depending on the contents of the file, it won't compress very efficiently. Some types of data are very repetitive, and therefore will compress very well, to a much smaller size. Data that is not very repetitive, such as images (jpgs are already inherently compressed), recorded sound, or just plain random data, don't compress very well.
Data that is highly repetitive, such as a simple text document, or log file, or even structured data files, such as database files, will compress very well. simple text files can often compress down to 10-15% of the original size.
Without knowing what data you are trying to compress, i would say that 2G compressing down to 850ish MB is pretty decent for mixed data.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
It's a single file (not a directory)? If so, try one of the options I gave you; e.g.,
Code:
bzip2 --repetitive-bist 2gigfile
See what that does for you; also try the other options and see what they do. You'll wind up with 2gifile.bz2.
If it's a single file, there really isn't much use in making a tar archive; I mean, you know where it was so you know where to bunzip2 it if you need it back, eh?
If you don't have the XZ utilities, you can find them at http://tukaani.org/xz or, perhaps, your distribution software site.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.