mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-26 02:09:52 +08:00
14 lines
297 B
Plaintext
14 lines
297 B
Plaintext
|
#!/usr/bin/env sh
|
||
|
|
||
|
if [ $# != 3 ]; then
|
||
|
echo "usage: $0 <cache-fs> <backing-pool> <days-old>"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
CACHE="${1}"
|
||
|
BACKING="${2}"
|
||
|
N=${3}
|
||
|
|
||
|
find "${CACHE}" -type f -atime +${N} -printf '%P\n' | \
|
||
|
rsync --files-from=- -axqHAXWES --preallocate --remove-source-files "${CACHE}/" "${BACKING}/"
|