Mac – How to return only file names from the find command

findmacterminal

I'm looking to get a list of just file names (without the rest of the path) when executing the find command from a terminal. How do I accomplish this on the mac?

Best Answer

With basename:

find . -type f -exec basename {} \;

Related Question