.smbdelete files accumulating on server share

Find:

sudo find . -name '.smbdeleteAAA*' \( -type d -exec find {} \; -prune -o -print \)

Delete:

sudo find . -type f -name '.smbdeleteAAA*' -print0 | xargs -0 rm -f

Spotted an answer on the Apple support forums: https://discussions.apple.com/message/30046649#message30046649

Apple introduced this behavior in OS X 10.10 you can find it in the source code here:

http://www.opensource.apple.com/source/smb/smb-759.40.1/kernel/smbfs/smbfs_smb.c

The comment above the code that does it is:

* We have an open file that they want to delete. Use the NFS silly rename
* trick, but try to do better than NFS. The picking of the name came from the
* NFS code. So we first open the file for deletion. Now come up with a new 
* name and rename the file. Make the file hidden if we can. Now lets mark
* it for deletion and close the file. If the rename fails then the whole call 
* should fail. If the mark for deletion call fails just set a flag on the 
* vnode and delete it when we close.

Other googling implies that these are held while 'someone' has an open file handler and are cleaned up automatically later.