Witam.
Czy używa ktoś z użytkowników NASa firmy QNAP?
Próbuję napisać skrypt usuwający pliki starsze niż n dni ale mi "nie idzie"...
Może e ktoś coś takiego robił?
Próbowałem wykorzystać find
i xargs
:
np. find /share/Download/* -mtime +5 | xargs rm
jednak, problemem są pliki zawierające spacje
szukając rozwiązania trafiłem na np.:
find /share/Download/* -mtime +5 | xargs -I{} rm -v {}
wtedy otrzymuje błąd:
xargs: invalid option -- 'I'
BusyBox v1.01 (2017.06.05-18:58+0000) multi-call binaryUsage: xargs [COMMAND] [OPTIONS] [ARGS...]
Executes COMMAND on every item given by standard input.
Options:
-r Do not run command for empty readed lines
-x Exit if the size is exceeded
-0 Input filenames are terminated by a null character
-t Print the command line on stderr before executing it.