mirror of
https://github.com/notwa/rc
synced 2024-07-02 11:47:12 -07:00
skip files larger than 512 MiB
This commit is contained in:
parent
ddec5dc5a3
commit
d6ca35b4d1
6
sh/oxo
6
sh/oxo
|
@ -63,6 +63,12 @@ oxo() { ### @-
|
||||||
else
|
else
|
||||||
local kib="$(du -k "$f" | cut -f1)"
|
local kib="$(du -k "$f" | cut -f1)"
|
||||||
|
|
||||||
|
if [ "$kib" -gt 524288 ]; then
|
||||||
|
: $((fails+=1))
|
||||||
|
printf "$bad" "oxo: file too large: $f" >&2
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
# compute retention using (fixed point) integers only.
|
# compute retention using (fixed point) integers only.
|
||||||
# retention = (365 - 30) * ([file size] / [512 MiB] - 1)**3 + 30
|
# retention = (365 - 30) * ([file size] / [512 MiB] - 1)**3 + 30
|
||||||
local a=$(( kib/16+1 ))
|
local a=$(( kib/16+1 ))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user