Created
July 6, 2023 19:20
-
-
Save andreoss/cf963f63f204ae5f93122a29cd29a1fe to your computer and use it in GitHub Desktop.
Fix duplicate UID errors after migrating Maildir to new machine
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
# Duplicate UID Errors | |
export OLD=old-hostname NEW=new-hostname | |
find ~/Maildir -name "*.${OLD}*" -type f -exec bash -c 'X={}; Y=${X/$OLD/$NEW}; [ "$X" != "$Y" ] && mv --verbose "$X" "$Y"' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment