How do you output the filename in find command while using -exec?

simply add a -printf option before

find -printf '%p' -exec command \;

If you don't want to recurse, there's no point in using find. It is far simpler to do it in the shell directly:

for d in */; do echo "$d"; svnadmin verify "$d"; done

The for d in */ will find all directories (the */ ensures only directories and no files are found); the echo "$d" will print the directory's name; the svnadmin verify "$d" will check the directory.

This can be run either directly from the command line or from within a script with no change in format.


find ./* -maxdepth 0 -type d -exec bash -c 'echo "{}"; svnadmin verify "{}"' \;

I have added -type d if it is only directories.