Search recursively through /mydir, outputting only the base (leaf) name of each file, directory, symlink etc. without any containing directories, that is the part following the last slash.
find /mydir | xargs -I{} basename {}