Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paularmstrong/4ff467d12a00b53c7861 to your computer and use it in GitHub Desktop.
Save paularmstrong/4ff467d12a00b53c7861 to your computer and use it in GitHub Desktop.
Two commands needed to perform UTF-8 NFD to NFC decomposition on all files in a directory, and uploading the resulting directory to a webserver. Useful for treating files created on a Linux server (NFC), downloaded to Mac OS X (NFD) and needing to be uploaded back to the original server (NFC). Must, naturally, be run on Linux or at least used on…
#!/usr/bin/env bash
convmv -f utf8 -t utf8 --nfc --replace --nosmart --no-test -r uploads/
rsync -avz -e ssh uploads/ username@host:mysite.com/public_html/wordpress/wp-content/uploads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment