<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Commentaires sur : Recherche de texte dans un fichier compressé</title>
	<atom:link href="http://www.superkikim.com/linux-attitude/recherche-de-texte-dans-un-fichier-compresse/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.superkikim.com/linux-attitude/recherche-de-texte-dans-un-fichier-compresse/</link>
	<description>Superkikim aussi, il blogue. Il blogue, il blague et partage ses découvertes</description>
	<lastBuildDate>Thu, 03 Jun 2010 20:21:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Par : Sébastien</title>
		<link>http://www.superkikim.com/linux-attitude/recherche-de-texte-dans-un-fichier-compresse/comment-page-1/#comment-117</link>
		<dc:creator>Sébastien</dc:creator>
		<pubDate>Tue, 19 Jan 2010 05:27:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.superkikim.com/?p=233#comment-117</guid>
		<description>Tant qu&#039;à parler de gzip, une fonction déroutante, est que le format gzip contient un champ pour la date de modification du fichier compressé (ou date de compression).

Ce qui fait que si on 2 fichiers (non compressés) au contenu identique fichier1.txt dans fichier2.txt,
    cmp renvoit que les fichiers sont identiques (ouf).
    cmp fichier1.txt fichier2.txt
    echo $?
    0

Mais, si on les compressent avec gzip (pas en même temps), on aura deux fichiers compressés différents
    cmp fichier1.txt.gz fichier2.txt.gz
    fichier1.txt.gz fichier2.txt.gz differ: byte 5, line 1
    echo $?
    1

Heureusement, on peut alors utiliser zcmp pour comparer les contenus
    zcmp test_gzip.txt.gz test_gzip2.txt.gz
    echo $?
    0


http://tools.ietf.org/html/rfc1952

MTIME (Modification TIME)
            This gives the most recent modification time of the original
            file being compressed.  The time is in Unix format, i.e.,
            seconds since 00:00:00 GMT, Jan.  1, 1970.  (Note that this
            may cause problems for MS-DOS and other systems that use
            local rather than Universal time.)  If the compressed data
            did not come from a file, MTIME is set to the time at which
            compression started.  MTIME = 0 means no time stamp is
            available.</description>
		<content:encoded><![CDATA[<p>Tant qu&#8217;à parler de gzip, une fonction déroutante, est que le format gzip contient un champ pour la date de modification du fichier compressé (ou date de compression).</p>
<p>Ce qui fait que si on 2 fichiers (non compressés) au contenu identique fichier1.txt dans fichier2.txt,</p>
<pre>
   cmp renvoit que les fichiers sont identiques (ouf).
   cmp fichier1.txt fichier2.txt
   echo $?
   0
</pre>
<p>Mais, si on les compressent avec gzip (pas en même temps), on aura deux fichiers compressés différents</p>
<pre>
   cmp fichier1.txt.gz fichier2.txt.gz
   fichier1.txt.gz fichier2.txt.gz differ: byte 5, line 1
   echo $?
   1
</pre>
<p>Heureusement, on peut alors utiliser zcmp pour comparer les contenus</p>
<pre>
   zcmp test_gzip.txt.gz test_gzip2.txt.gz
   echo $?
   0
</pre>
<p><a href="http://tools.ietf.org/html/rfc1952">http://tools.ietf.org/html/rfc1952</a></p>
<p>MTIME (Modification TIME)</p>
<pre>
           This gives the most recent modification time of the original
           file being compressed.  The time is in Unix format, i.e.,
           seconds since 00:00:00 GMT, Jan.  1, 1970.  (Note that this
           may cause problems for MS-DOS and other systems that use
           local rather than Universal time.)  If the compressed data
           did not come from a file, MTIME is set to the time at which
           compression started.  MTIME = 0 means no time stamp is
           available.
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Sébastien</title>
		<link>http://www.superkikim.com/linux-attitude/recherche-de-texte-dans-un-fichier-compresse/comment-page-1/#comment-116</link>
		<dc:creator>Sébastien</dc:creator>
		<pubDate>Tue, 19 Jan 2010 05:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.superkikim.com/?p=233#comment-116</guid>
		<description>Pour la première ligne (gunzip -c *.gz &#124; grep ), il y a aussi: zgrep,
par contre, je n&#039;ai pas trouvé de ztargrep...

zgrep - search possibly compressed files for a regular expression

SYNOPSIS
       zgrep [ grep_options ] [ -e ] pattern filename...

DESCRIPTION
       Zgrep  invokes grep on compressed or gzipped files.  All options speci-
       fied are passed directly to grep.  If no file is  specified,  then  the
       standard input is decompressed if necessary and fed to grep.  Otherwise
       the given files are uncompressed if necessary and fed to grep.

       If the GREP environment variable is set, zgrep uses it as the grep pro-
       gram to be invoked.</description>
		<content:encoded><![CDATA[<p>Pour la première ligne (gunzip -c *.gz | grep ), il y a aussi: zgrep,<br />
par contre, je n&#8217;ai pas trouvé de ztargrep&#8230;</p>
<p>zgrep &#8211; search possibly compressed files for a regular expression</p>
<p>SYNOPSIS</p>
<pre>
      zgrep [ grep_options ] [ -e ] pattern filename...
</pre>
<p>DESCRIPTION</p>
<pre>
      Zgrep  invokes grep on compressed or gzipped files.  All options speci-
      fied are passed directly to grep.  If no file is  specified,  then  the
      standard input is decompressed if necessary and fed to grep.  Otherwise
      the given files are uncompressed if necessary and fed to grep.
</pre>
<pre>
      If the GREP environment variable is set, zgrep uses it as the grep pro-
      gram to be invoked.
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
