Created
July 4, 2023 02:22
-
-
Save BoyanXu/a29e262d9692e316c13d32b18c359331 to your computer and use it in GitHub Desktop.
Bash script to clean Syncthings syn conflict files
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 | |
# Go through each file with "sync-conflict" in its name | |
# -type f ensures we are only dealing with files (not directories) | |
find . -type f -name '*sync-conflict*' -print0 | while IFS= read -r -d '' file | |
do | |
# Check if file exists (it should, but let's be safe) | |
if [ -f "$file" ]; then | |
echo "Deleting $file" | |
rm "$file" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment