How to only get file name with Linux 'find'?
If your find doesn't have a -printf option you can also use basename:
find ./dir1 -type f -exec basename {} \;
In GNU find
you can use -printf
parameter for that, e.g.:
find /dir1 -type f -printf "%f\n"