On Sun, Jul 07, 2002 at 10:36:41PM +0200, Eduard Bloch wrote: > > [Fortschrittsanzeige beim Kopieren] > > > Du könntest cpio benutzen, das ist überall drauf, und kann > > > Fortschritspünktchen anzeigen. > > Es gibt da noch ein nettes Tool namens cpipe, cpipe.berlios.de. Hm, ich > werde das geschwind debianisieren... done... > http://people.debian.org/~blade/testing/. ich habe mir die seite angesehen. so wie ich sie verstanden habe, braucht cpipe eingaben per stdin, macht eine statistische auswertung, und gibt sie unveraendert wieder aus. ist nicht so optimal bei cp -a. ich habe mal kurz ein dpipe :) geschrieben. es gibt einfach punkte aus, solange eine pipe vorhanden ist. cp -ar /var/log/ /tmp/ 2>/tmp/error.log | ./dpipe oder sleep 15 | ./dpipe nur 'ne spielerei :) gruss oliver -- Oliver Zendel LinuxTag-Team email: zendel@linuxtag.de phone: +49-631-3109371 http://www.linuxtag.de/ fax: +49-631-3109372
/* gcc -o dpipe dpipe.c */ #include <stdio.h> #include <sys/types.h> #include <sys/time.h> int main(int argc, char** argv) { fd_set readfds; struct timeval tv; int r; for (;;) { FD_ZERO(&readfds); FD_SET(0, &readfds); tv.tv_sec=0; tv.tv_usec=0; r = select(1, &readfds, NULL, NULL, &tv); if (r) getchar(); if (feof(stdin)) { fprintf(stdout,"\n"); exit(0); } fprintf(stdout,"."); fflush(stdout); sleep(1); }; }
Attachment:
pgp5uUCSJjLGG.pgp
Description: PGP signature