Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .
Convert all files in a directory from NFC to NFD:
convmv -r -f utf8 -t utf8 --nfd --notest .
Also note that on MacOS, the command
iconv
can be used to convert between NFD and NFCiconv -f UTF-8 -t UTF-8-MAC
(or vice versa of course)but many UNIX/Linux implementations that I've come across have the
iconv
command but do not support the UTF-8-MAC option...