You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
timelapse/bin/timelapse_garbage_collector.sh

17 lines
328 B

#!/bin/bash
DATA_DEVICE_UUID="C6CE6C2BCE6C1649"
MOUNT_PATH="/mnt/extern"
DATA="${MOUNT_PATH}/timelapse"
CLIENT="timelapse@192.168.111.2"
CLIENT_FOLDER="/timelapse"
for i in `find ${DATA}/data/ -name "*.jpg"`
do
NUM_HARDLINKS=`stat --format="%h" ${i}`
if [ ${NUM_HARDLINKS} -lt 2 ]
then
mv "${i}" "${DATA}/trash"
fi
done