33 lines
1.2 KiB
Bash
33 lines
1.2 KiB
Bash
#!/bin/sh
|
|
# usr/syno/bin
|
|
# Link erstellen ln -s /volume1/Backup/NAS_Scripte/porord.sh /usr/syno/bin/porord.sh
|
|
|
|
# >>/volume1/Backup/NAS_Scripte/LOG/$LOGFILE
|
|
|
|
# Logfile
|
|
NOW=`date +'%d.%m.%Y'`
|
|
LOGFILE="logVersch-$NOW.log"
|
|
|
|
|
|
|
|
# Verschiebt alles in Por Root
|
|
find /volume1/Filesharing/!X/* \( -iname "*.mov" -o -iname "*.avi" -o -iname "*.mkv" -o -iname "*.wmv" -o -iname "*.iso" -o -iname "*.mp4" -o -iname "*.img" -o -iname "*.asf" -o -iname "*.mpg" -o -iname "*.mpeg" -o -iname "*.m4v" -o -iname "*.vob" -o -iname "*.flv" \) -type f \( ! -regex '/volume1/Filesharing/!X/$RECYCLE.*' \) \( ! -regex '/volume1/Filesharing/!X/!NEU/.*' \) \( ! -regex '/volume1/Filesharing/!X/!OLD/.*' \) \( ! -regex '.*/@eaDir/*.*' \) \( ! -regex '/volume1/Filesharing/!X/$RECYCLE.*' \) -exec mv {} /volume1/System/!NEU/ \;
|
|
|
|
# Löscht samples aus dem root.
|
|
#find /volume1/System/ -iname "*sample*" \( ! -regex '.*/@eaDir/*.*' \) \( ! -regex '/volume1/System/$RECYCLE.*' \) -exec rm -r "{}" \;
|
|
|
|
#Löscht alle ordner ohne inhalt
|
|
find /volume1/Filesharing/!X/* -type d \( ! -regex '.*/@eaDir/*.*' \) \( ! -regex '/volume1/Filesharing/!X/$RECYCLE.*' \) \( ! -regex '/volume1/Filesharing/!X/!NEU.*' \) -size -2M -exec rm -rf "{}" \;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|