trsync tree limitation
This commit is contained in:
parent
b9631e016e
commit
316a6ec0f4
@ -1,7 +1,20 @@
|
||||
#!/bin/bash
|
||||
HEADTREE=75
|
||||
TAILTREE=75
|
||||
|
||||
|
||||
if [ $# -eq 2 ]; then
|
||||
tree -ha --du "$1"
|
||||
TREEFILE=$(mktemp -t treefile)
|
||||
tree -ha --du "$1" >> $TREEFILE
|
||||
if [ $(cat $TREEFILE | wc -l) -gt $[TAILTREE + HEADTREE] ]; then
|
||||
head -${HEADTREE} $TREEFILE
|
||||
echo ...
|
||||
tail -${TAILTREE} $TREEFILE
|
||||
echo Full tree in $TREEFILE
|
||||
else
|
||||
cat $TREEFILE
|
||||
fi
|
||||
|
||||
time rsync -vazh --progress --partial "$@"
|
||||
else
|
||||
time rsync "$@"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user