2014 shaares
45 private links
45 private links
Pour scanner que les dossiers qui ont changé (pratique si on a plein de dossiers/fichiers comme moi)
---> scan-occ-files.sh
!/bin/bash
workDIR=/var/www/nextcloud
users=$(sudo -u www-data $workDIR/occ user:list | sed 's/.- (.):.*/\1/g')
for user in $users ;
do
echo $user;
cd $workDIR/data/$user/files
find . -type d -mtime -1 | tr -d '^.' | grep -v '^$' | while read dir ; do
sudo -u www-data $workDIR/occ files:scan --path="$user/files$dir "
done
done