mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-25 02:13:30 +08:00
14 lines
297 B
Bash
Executable File
14 lines
297 B
Bash
Executable File
#!/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}/"
|