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 .
NOTE: Apple's new file system, APFS, apparently preserves Unicode normalization: if it gets a filename specified with decomposed Unicode (NFD), it won't change it, but if APFS writes new files, it will use the NFC (composed char) form.
You might not need
covmv
with APFS.https://medium.com/@yorkxin/apfs-docker-unicode-6e9893c9385d
(I used to run ZFS storage arrays on my Mac Pro, and had a script that would set NFD on ZFS volume setup. Note that this was when I was using ZFS as direct-attached storage; for a while it seemed that ZFS was to be the next-gen macOS file system of choice. That blew up when Sun was acquired by Oracle, and Sun was not able to separate intellectual-property claims in order to ensure its ability to license the ZFS codebase. So now we have APFS, and macOS seems to have used the decade-long delay to implement NFC in its VFS layer. YMMV. WWJD. WTF.)