Creating garbage collector.

master
Holger Wirtz 5 years ago
parent 243aa1ac1a
commit 475460abf6
  1. 16
      bin/timelapse_garbage_collector.sh

@ -0,0 +1,16 @@
#!/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
echo "${i} : ${NUM_HARDLINKS}"
fi
done
Loading…
Cancel
Save