On Mon, Oct 03, 2011 at 03:07:38PM +0200, Félix Hauri wrote: > On Mon, Oct 03, 2011 at 12:37:46PM +0200, Andrea Chiapuzzi wrote: > > > > http://www.commandlinefu.com/commands/tagged/676/copy-progress > > http://www.commandlinefu.com/commands/view/5107/copy-a-file-using-pv-and-watch-its-progress > > http://www.commandlinefu.com/commands/view/2851/copy-with-progress > > http://www.commandlinefu.com/commands/view/4946/copy-with-progress > > M'ouais, y'en a des très moches! > (L'exemple avec copy() me semble à priori riche en bugs divers...) > > Et bien qu'on y parle de ``préserver les droit et attributs'', je trouve > qu'il y manque ``tar | tar''... En fait si!
Il fallait chercher ``progress'', pour trouver plien de trucs... http://www.commandlinefu.com/commands/matching/progress/cHJvZ3Jlc3M=/sort-by-votes Mais surtout: je ne connaissais pas la commande ``pv'' qui est pourtant installée sur ma machine depuis au moins 2008... L'exemple donné dans la man page mentionne ``tar'' et utilise ``dialog''. voir ``man pv''... Splendide! (J'aime bien la recommendation: A more complicated example using numeric output to feed into the dialog(1) program for a full-screen progress display: (tar cf - . \ | pv -n -s `du -sb . | awk '{print $1}'` \ | gzip -9 > out.tgz) 2>&1 \ | dialog --gauge 'Progress' 7 70 Frequent use of this third form is not recommended as it may cause the programmer to overheat. ... Doucement, les mecs! ;-) Voilà, on peut égallement remplacer ``> out.tgz'' par ``| tar -xpC $DESTINATION'' Well, j'ai encore apris un truc, aujourd'hui! -- Félix Hauri - <[email protected]> - http://www.f-hauri.ch _______________________________________________ gull mailing list [email protected] http://forum.linux-gull.ch/mailman/listinfo/gull
