Hot answers tagged

166

Part 1: Performance Here is a comparison of two separate workflows and what they do. You have a file on disk blah.tar.gz which is, say, 1 GB of gzip-compressed data which, when uncompressed, occupies 2 GB (so a compression ratio of 50%). The way that you would create this, if you were to do archiving and compression separately, would be: tar cf ...


143

Stop using these WinRAR and WinZip tools -- shift to 7-Zip. It's free available across platforms, as command-line and GUI available in portable form across platforms has good compression ratio (check the site or try for yourself) has no pop-up pain allows you to use most of the other formats it is also open-source can be used in commercial and personal ...


119

Using Homebrew, in a terminal type: brew install unrar to use it just navigate to your file and type unrar x <filename> Or list files via unrar l archive.rar and extract single file: unrar e archive.rar folder/file.exe desired_location/


100

This has been answered on Stack Overflow. bzip and gzip work on single files, not groups of files. Plain old zip (and pkzip) operate on groups of files and have the concept of the archive built-in. The *nix philosophy is one of small tools that do specific jobs very well and can be chained together. That's why there's two tools here that have ...


59

Tar has a rich set of operations and modifiers that know all about Unix files systems. It knows about Unix permissions, about the different times associated with files, about hard links, about softlinks (and about the possibility that symbolic links could introduce cycles in the filesystem graph), and allow you to specify several different ways for managing ...


55

The Unarchiver really does it's job well (it's also free and open-source). From the site: Supported file formats include Zip, Tar-GZip, Tar-BZip2, RAR, 7-zip, LhA, StuffIt and many other more and less obscure formats. The goal is to make The Unarchiver able to extract anything you give it. The Unarchiver uses the libxad unarchiving library to ...


40

In Addition to what was said before by grawity and Paul: History In the "old days", cpio (with option -c used) was the tool to use when it came to move files to other UNIX derivates since it was more portable and flexible than tar. But the tar portabilityissues may be considered as solved since the late 1980s. Unfortunately it was about that time that ...


39

GNU tar lives on featuritis, so naturally also has some options for that. http://www.gnu.org/software/tar/manual/html_node/transform.html If you just want to remove a few path segments, then --strip-components=n or --strip=n will often do: tar xvzf tgz --strip=1 But it's also possible to regex-rewrite the files to be extracted (flags are --transform or -...


36

Zipping zips is fine. If there is a problem, that would be a bug in the compression software :). You will probably not get any further compression for those files though unless you're using a higher level of compression.


33

You can do it by using this method . Tools > Convert Archives > Compression > Advanced > Set Password > then click ok and save . :)


32

Short answer It's impossible to guarantee a long timeframe because of entropy (also called death!). Digital data decay and dies, just like any other thing in the universe. But it can be slowed down. There's currently no fail-proof and scientifically proven way to guarantee 30+ years of cold data archival. Some projects are aiming to do that, like the ...


30

7-zip uses AES-256 encrpytion for 7z/zip archives. http://7-zip.org/7z.html says: 7-Zip also supports encryption with AES-256 algorithm. This algorithm uses cipher key with length of 256 bits. To create that key 7-Zip uses derivation function based on SHA-256 hash algorithm. A key derivation function produces a derived key from text password defined by ...


29

It's HARDCORE! Really. That's most RAR users' reason for preferring RAR: Part of the scene. A standard. A sign of doing things like the black-arts-pros do it. None of these are valid reasons. There was an argument that RAR was faster or that RAR achieved smaller sizes, and this holds true versus ZIP files. But the same people will insist on splitting RAR ...


27

Here's a solution that will work even if your scanner produces JPEGs: Scan all pages as separate JPEG images Open all JPEGs at once in Preview (Select all, right-click, Open with … » Preview) Select all images in the right hand navigation pane in Preview (select any one; CmdA – you can also change their order here if needed) From the File menu, select ...


27

You confuse the two distinct processes of archiving and compression. Reasons for using an archiver One reason to use archiving without compression is, for instance, if a bunch of files is copied from one host to another. A command like the following tar cf - some_directory | ssh host "(cd ~/somewhere | tar xf -)" can speed up things considerably. If I ...


23

alias untar='tar -xvzf' Place in your .bashrc file to persist across logins/shell sessions, or in your /etc/bash.bashrc file to persist for logins from all users on your system.


23

Adding to the other good answers here, I prefer the combination tar + gzip|bzip2|xz mainly because these compressed files are like streams, and you can pipe them easily. I need to uncompress a file available in the internet. With either zip or rar formats I have to download it first and then uncompress it. With tar.{gz,bz2,xz} I can download and uncompress ...


22

Image Capture does this. There's a tickbox when you've selected PDF as the output. I don't have a scanner on this system, but we use it every day at work. Do it this way: Make sure your scanner is installed properly Place the first page under your scanner Hit command-space Enter "Image Capture" Press Enter Now the application "Image Capture" is started ...


22

I am not sure you can do what you are suggesting using the graphical user interface, but you can certainly from the command line: FOR %i IN (*.*) DO 7z.exe a "%~ni.7z" "%i" You would need to change directory (the cd command) to the F:\Downloads directory first, or whatever directory you would want to perform the mass compression. Also, it is easy enough ...


21

It's fairly safe to assume that the file parts just need to be concatenated together. The easiest way to do this is within 7-Zip - navigate to the folder in the 7-Zip file manager, right-click on the first file in the sequence, and select "Combine Files..." from the context menu. It can also be easily done on the command line. On Windows: copy /B input.z*...


20

Both tar and cpio have a single purpose: concatenate many separate files to a single stream. They don't compress data. (These days tar is more popular due to its relative simplicity – it can take input files as arguments instead of having to be coupled with find as cpio has.) In your case, you do not need either of these tools; they would have no ...


19

.tar.gz files are (still, after some years in that position) the most common archive format for archives intended for unix-a-like systems. Users on any unix-a-like system will be able to open these without installing additional software, but users running Windows can not. They are sometimes called .tgz instead though this is less common now (the convention ...


17

You might also be interested in the following: x(){ if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xvjf $1 ;; *.tar.gz) tar xvzf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; ...


17

If you tell Windows that JAR, WAR and EAR files are compressed folders, Explorer will show you what is inside without having to rename them to ZIP. Very helpful when there is a JAR inside a WAR. Run this in an Administrative Command Prompt window: assoc .jar=CompressedFolder assoc .war=CompressedFolder assoc .ear=CompressedFolder (Better late than never)


17

Use crypt or gpg on the file. Simple examples: cat filename | crypt > filename.crypt gpg -c filename –o filename.gpg


17

Paper Other than archival ink on archival paper in sealed storage, no current medium is proven to last an average 100 years without any sort of maintenance. Archival Paper Older papers were made from materials such as linen and hemp, and so are naturally alkaline. or acid free, therefore lasting hundreds of years. 20th century paper and most modern ...


16

Lossless Compression Lossless compression is where no data is lost. Everything that is entered can be retrieved perfectly. This works well for text or binary files where the smallest error will be noticed. File compression works by taking the file and scanning for patterns, and translating those patterns into something else which takes up less space. For ...


15

There are a large variety of compression formats and methods available, some don't compress at all and are designed to store a number of files in one archive, and other newer experimental compressors (PAQ based) are designed to compress as aggressively as possible, regardless of the time it takes to perform said operation. You need to evaluate the features ...


14

A point against RAR is that there is (as far as I know) no free software that can compress it. As current versions of WinRAR can decompress 7z (and 7z can decompress rar), and 7z usually compresses better than zip (and often better than rar), I tend to send those who send me RAR files 7Z files back :) All the others get plain old .zip files of course. Maybe ...


14

I ran into this same problem recently, on OS X 10.6.6. I have been zipping my VMware VMs up at a command line, and copying them to backup media. When I tried to unzip a backed-up VM after a hardware failure, I had a few tense minutes as I wrestled with unzip's "start of central directory not found; zipfile corrupt" error. After some poking around, the ...



Only top voted, non community-wiki answers of a minimum length are eligible