Questions tagged [compression]

Compression is the process in which a file or folder's size is reduced by using an algorithm to encode the same information using fewer bits.

Many video and audio codecs use compression to save bandwidth. Also, compression can be used to help save disk space, such as by packaging files inside a tarball or .zip folder. Compressed data needs to be decompressed by the appropriate algorithm before it can be used.

For an in-depth look at what compression is, read more on Wikipedia.

232 questions
1249
votes
8 answers

What command do I need to unzip/extract a .tar.gz file?

I received a huge .tar.gz file from a client that contains about 800 mb of image files (when uncompressed.) Our hosting company's ftp is seriously slow, so extracting all the files locally and sending them up via ftp isn't practical. I was able to…
EmmyS
  • 17,031
1022
votes
12 answers

How do I uncompress a tarball that uses .xz?

I'm used to extracting tarballs with a -xfz flag, which handles gzip and bzip2 archives. Recently I've run into a .tar.xz file and I would like to uncompress it in one step using tar, how can I do that?
Jorge Castro
  • 73,717
827
votes
25 answers

How can I reduce the file size of a scanned PDF file?

I have a 72.9 MB PDF file that I need to shrink to 500 KB or below. The file was a JPEG image that I had scanned and then converted to PDF.
tamimym
  • 8,419
243
votes
3 answers

How do I compress a directory?

I'm trying to compress a directory and ftp it to a windows ftp. I have tried every tar command I can find to compress a directory. It appears to be ok. Then I transfer it and view it's contents using Winrar. Winrar keeps telling me the file is…
dko
  • 2,623
202
votes
7 answers

What's the difference between .tar.gz and .gz, or .tar.7z and .7z?

Recently, I've been backing up a lot of my data, and I noticed that I can save files as .gz or .tar.gz, or .7z and .tar.7z, etcetera. What are the differences between the normal one and the .tar.* variant? Which one of them is adviced when making…
140
votes
8 answers

What's the easiest way to unrar a file?

I just realized I can't unrar .rar files on my Ubuntu machine! What's the easiest way to accomplish this fundamental task? If possible I'd love something like 7Zip that I can just right Click, and extract and have the program worry about how to do…
129
votes
3 answers

how to extract tar.7z files from command line?

Is there a way to extract files of tar.7z format using command line tools in Ubuntu?
104
votes
2 answers

Compressing folders with password via command line

I would like to know whether it is possible to do the following via CLI. I have a Folder F which contains several sub folders and some files. I want to compress folder F into .zip file with the "password-only-extract".
Varun
  • 2,109
102
votes
7 answers

Zip an archive without including parent directory

I want to zip many folders in a directory tree like so V- something.txt folder folder g.jpg h.jar When I try to zip it, it ends creating a zip archive with the v folder instead of the contents of it (the sub directories and files) How can I…
Dami
  • 1,171
102
votes
11 answers

How to reduce the size of a pdf file?

I'm looking for a way in Ubuntu to reduce the size of a pdf (by reducing the quality of the images). I know that this can be done in Ghostscript by typing the following command in terminal: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4…
Nicole
  • 1,121
82
votes
2 answers

Compress in .tgz

I want to compress files in .tgz. I know how to make tar.gz(with tar and gzip) and some people say it is almost the same, but I need to make a .tgz, how??
RocketMan
  • 1,091
  • 2
  • 8
  • 7
76
votes
9 answers

Multi-Core Compression tools

What compression tools are available in Ubuntu that can benefit from a multi-core CPU.
Luis Alvarado
  • 216,643
62
votes
3 answers

Best compression method?

I want to compress a 16GB folder, but what's the best method? tar.gz? tar.bz2 rar? 7z? Would the archive be smaller if I first compressed in a method, then copy the compressed archive to a new folder, then re-compressed in some other method? I need…
Amanda
  • 1,037
  • 1
  • 11
  • 13
39
votes
3 answers

How to extract files from a split 7zip archive?

I downloaded a series of packages that all compress one thing. The files end in .0, .1, .2, etc. The User Lists of these packages I downloaded say to use the file.bat to successfully extract, or to use 7zip. I do not understand how to do that with…
Eugenio
  • 391
  • 1
  • 3
  • 3
37
votes
5 answers

Will btrfs automatically compress existing files when compression is enabled?

I chose btrfs as the format of my / filesystem in the Ubuntu 12.04 LTS installer. After the installation completed, I added compress=lzo to the mount options in /etc/fstab and rebooted. Will the existing files be automatically compressed now, or…
ændrük
  • 78,496
1
2 3
15 16