Group: attr(1) header(2) footer(3) sidebar(4) Page: view(q) edit(w) attr(e) attach(a) history(d)

Parameter:

  - Verzeichnis, dass überwacht wird
  - Größe des Quell-Verzeichnisses

 
#!/bin/sh

BEGIN=`du -s $1 | cut -f 1`
BEGIN=`du -s $1 | cut -f 1`
STARTTIME=`date +%s`
TOTAL=$2
while true ; do
  sleep 1
  SEC=$(( `date +%s` - ${STARTTIME} ))
  CURRENT=`du -s $1 | cut -f 1`
  echo $(( ( ${TOTAL} - ${CURRENT} ) * SEC / ( ${CURRENT} - ${BEGIN} )  ))
done

Page last modified on March 28, 2008, at 07:23 PM
Edit Page - Page History - Printable View - Recent Changes - WikiHelp - SearchWiki