From 82ea7c6720bf088e47035b86e2d69f03c730c778 Mon Sep 17 00:00:00 2001 From: 6543 Date: Tue, 5 Mar 2019 21:15:49 +0100 Subject: [PATCH] add-mon-tool show2cp --- show2cp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 show2cp diff --git a/show2cp b/show2cp new file mode 100644 index 0000000..dbe0668 --- /dev/null +++ b/show2cp @@ -0,0 +1,17 @@ +#!/bin/bash + +function calc_kb() { + i=0 + cat 2cp | cut -c 35- | while read line; do + kb=$(du "$line" | cut -f 1) + i=$((i+kb)) + echo $i + done | tail -n1 +} + +kb=$(calc_kb) +mb=$((kb/1024)) +gb=$((mb/1024)) +tb=$((gb/1024)) + +echo "Noch Zu Kopieren: $kb Kb = $mb Mb = $gb Gb = $tb Tb"