mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +00:00
print human-readable size of debian
This commit is contained in:
parent
1dc46a67a7
commit
90e34a3a2e
@ -24,6 +24,8 @@ if [[ $1 == sync:archive:* ]]; then
|
||||
tail --retry -f "${FTPSYNC_LOG_DIR}/rsync-ftpsync-${jobname}.log" &
|
||||
tail --retry -f "${FTPSYNC_LOG_DIR}/rsync-ftpsync-${jobname}.error" &
|
||||
wait $PID
|
||||
sz=$(tail -n 15 ${FTPSYNC_LOG_DIR}/rsync-ftpsync-${jobname}.log|grep -Po '(?<=Total file size: )\d+')
|
||||
[[ -z "$sz" ]] || echo "Total size is" $(numfmt --to=iec $sz)
|
||||
else
|
||||
echo "Invalid command line"
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user