ls: : Operation not permitted - Mojave security?
A less drastic way:

Go to System Preferences > Security &amp; Privacy and give Full Disk Access to Terminal.

Adapted from https://discussions.apple.com/thread/8637915