emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 6d6bf46 2/2: Make dired-do-compress work for *.tar.gz files


From: Eli Zaretskii
Subject: Re: master 6d6bf46 2/2: Make dired-do-compress work for *.tar.gz files
Date: Fri, 16 Oct 2015 17:35:58 +0300

> From: Oleh Krehel <address@hidden>
> Cc: address@hidden
> Date: Fri, 16 Oct 2015 15:47:03 +0200
> 
> OK, I propose the following entry in `dired-compress-file-suffixes' to
> be used when "Z" is pressed on a directory:
> 
>     (t ".tar.gz" "tar -c %i | gzip -c9 > %o")

If you intend to use redirection at the shell command-line level, the
file name that replaces %o will need on MS-Windows to be run through
some function that converts forward slashes to backslashes.

Otherwise, OK.

> >> And this for decompression:
> >> 
> >>     gzip -dc example.tar.gz | tar -x
> >
> > Yes (except that you could use gunzip.)
> 
> So:
> 
>     gunzip -dc example.tar.gz | tar -x
> 
> and the corresponding entry in `dired-compress-file-suffixes':
> 
>     ("\\.tar\\.gz\\'" "" "gunzip -dc %i | tar -xv")

You don't need the 'd' part with gunzip.

Also, don't you need to use "tar -xf -"?

> Also, what is the difference between gzip and gunzip?

The -d switch, see above.

> Well, Paul has a weird tar that doesn't understand "-z", so I wonder
> what exact command he uses for *.tar.gz.

The same as you show above.

And there's nothing weird with that: the original Unix Tar didn't
support compression, only GNU Tar added that.  You are "spoiled" by
GNU/Linux which uses GNU tools out of the box.  Other kinds of Unix
don't.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]