Created
March 24, 2022 15:41
-
-
Save unbelauscht/598f1d2e2e0afe89b83a57cd3d7fb120 to your computer and use it in GitHub Desktop.
fix nextcloud invalid modification time issues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
files=`find . -newermt "0000-12-31 23:59:59" ! -newermt "1970-00-01 23:59:59"` | |
for filename in $files; do | |
touch -a -m "${filename}" | |
done | |
# You need to run | |
# php occ files:scan --all | |
# to reindex your files to your DB. | |
# see: https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#file-operations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment