port install coreutils also works for macports.
you’ll need to add /opt/local/libexec/gnubin/ to your PATH.