Dateien nach "/" hochladen
This commit is contained in:
36
porord1.sh
Normal file
36
porord1.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/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="log-$NOW.log"
|
||||
|
||||
# Entpackt und l<>scht rar,s nach erfolgreichen entpacken.
|
||||
# for RAR in `find /volume1/System/ \( -iname "*.rar" \) -type f \( ! -regex '/volume1/System/#recycle/.*' \) \( ! -regex '.*/@eaDir/*.*' \) \( ! -regex '/volume1/System/$RECYCLE.*' \) ` ; do cd `dirname $RAR`; unrar x -kb -o- '$RAR' && rm *.r?? ;
|
||||
|
||||
# L<>scht auch rar,s die noch so umherfliegen ohne oben gel<65>scht zu werden (weil schon vorhandene film datei).
|
||||
# find /volume1/System/ \( -iname "*.r??" \) -type f \( ! -regex '/volume1/Filesharing/#recycle/.*' \) -delete
|
||||
|
||||
# Verschiebt alles in Por Root
|
||||
find /volume1/System/* \( -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" -o -iname "*.rm" \) -type f \( ! -regex '/volume1/System/$RECYCLE.*' \) \( ! -regex '/volume1/System/!NEU/.*' \) \( ! -regex '/volume1/System/!OLD/.*' \) \( ! -regex '.*/@eaDir/*.*' \) \( ! -regex '/volume1/System/$RECYCLE.*' \) -exec mv {} /volume1/System/ \;
|
||||
|
||||
# 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/System/* -type d \( ! -regex '.*/@eaDir/*.*' \) \( ! -regex '/volume1/System/$RECYCLE.*' \) \( ! -regex '/volume1/System/!NEU.*' \) -size -2M -exec rm -rf "{}" \;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user