puh current config pre departure
This commit is contained in:
10
templates/purge_thumbnails.sh.j2
Normal file
10
templates/purge_thumbnails.sh.j2
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
TARGET_DIR="{{ working_folder }}/small_thumbs"
|
||||
cd "$TARGET_DIR" || exit
|
||||
# Find all files, sort them by modification time (oldest first), and delete all but the 50 most recent
|
||||
ls -t | tail -n +51 | while read -r file; do
|
||||
if [ -f "$file" ]; then
|
||||
# echo "Deleting file: $file"
|
||||
rm "$file"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user