How to only get file name with Linux ‘find’?

In GNU find you can use -printf parameter for that, e.g.:

find /dir1 -type f -printf "%f\n"

Leave a Comment