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

Re: [linux-team] gzip | dd problem (solution)



Merci. 

Patrick
Vranckx@sia.ucl.ac.be

On Thu, 10 Jun 1999, Alain Spineux wrote:

> esplication ( enfin tentative )
> 
> - gzip et dd son lance en meme temps, connecte par un pipe
> 
> maintenant supposons que :
> 
> - gzip commence et decompacte 1k dans le pipe
> - dd prend la suite et essaye de lire 2500bytes, il n'en lit
> que 1000 mais considere qu"il vien de lire un block, donc plus que 14
> a lire. Le pipe est vide dd passe la main
> - gzip decompacte maintenant 3k et passe la main
> - dd lit 2500, les ecrit ds output, le pipe n'etant pas vide, il essaye a
> nouveau de lire 2500, mais il ne reste que 500, qu'il lit et ecrit dans
> outpout
> - etc ....
> 
> ainsi donc dd va lire 15 une quantite inf ou = a 2500 byte. Et suivant
> le scheduling, les quantite peuvent changer => etre alatoire !
> 
> $ gzip -dc blanktgz | dd obs=2500  | dd of=output ibs=2500 count=15
> 
> ceci fait le boulot correctement, puisque le premier dd ne donne au second
> 
> que des block de 2500 bytes. Ceci tente de monterr que j'ai juste
> 
> A+
> 
> vranckx wrote:
> 
> > Bonjour,
> >
> > J'ai qqchose que je n'arrive pas a comprendre. J'ai lance la commande
> > suivante plusieurs fois de suite. J'obtiens des resultats differents !
> > Le fichier blank fait 1Mb.
> > J'ai essaye sur Solaris. la taille du fichier de sortie est incorrecte
> > egalement.
> >
> > Patrick Vranckx
> > vranckx@sia.ucl.ac.be
> >
> > [root]#gzip -dc blank.gz | dd of=output ibs=2500 count=15 ; du
> > -b
> > output
> > 15+0 records in
> > 73+1 records out
> > 37500   output
> > [root]#gzip -dc blank.gz | dd of=output ibs=2500 count=15 ; du -b
> > output
> > 8+7 records in
> > 60+1 records out
> > 31172   output
> > [root]#gzip -dc blank.gz | dd of=output ibs=2500 count=15 ; du -b
> > output
> > 8+7 records in
> > 60+1 records out
> > 31172   output
> > [root]#gzip -dc blank.gz | dd of=output ibs=2500 count=15 ; du -b
> > output
> > 8+7 records in
> > 60+1 records out
> > 31172   output
> > [root]#gzip -dc blank.gz | dd of=output ibs=2500 count=15 ; du -b
> > output
> > 8+7 records in
> > 60+1 records out
> > 31172   output
> > [root]#gzip -dc blank.gz | dd of=output ibs=2500 count=15 ; du -b
> > output
> > 15+0 records in
> > 73+1 records out
> > 37500   output
> >
> > ---------
> > This message was sent by Majordomo 1.94.3. Please report problems to
> > manu@rtfm.be. If you want to be deleted from the list, send a mail to
> > majordomo@rtfm.be with "unsubscribe linux-team" in the body.
> 
> --
> 
>         Spineux Alain
> 
> Romani ite domus.
> ======================================================================
>   Spineux Alain                         E-MAIL : spineux@prm.ucl.ac.be
>   INSTITUT STEVIN
>   Catholic University of Louvain        FAX    : 32-10-472501
>   PLACE DU LEVANT 2                     PHONE  : 32-10-472516
>   B-1348 LOUVAIN-LA-NEUVE (BELGIUM)
> =======================================================================
> 
> 
> ---------
> This message was sent by Majordomo 1.94.3. Please report problems to
> manu@rtfm.be. If you want to be deleted from the list, send a mail to
> majordomo@rtfm.be with "unsubscribe linux-team" in the body.
> 

---------
This message was sent by Majordomo 1.94.3. Please report problems to
manu@rtfm.be. If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.