[Samba] way to get smbclient to do "dir *\filename"?

Jeremy Allison jra at samba.org
Fri Mar 26 18:33:14 MDT 2010

On Wed, Mar 24, 2010 at 11:24:49AM +1300, Jason Haar wrote:
> Says it all really. I'm hoping there's some escape char trick I could do
> to make this work? Recursing through all the directories would obviously
> work, but this is for a script that runs over the WAN, so performance is
> a major issue - I literally just want to see if a file exists in one of
> the next layers down. Just getting the wildcard through (I think CIFS
> allows that?) would solve the problem. I could use mount.cifs - but this
> scripts runs massively in parallel and I dread mounting and unmounting
> on that scale - smbclient is the perfect tool for the job (if only it
> worked ;-)
> I've tried this with 3.2.11, I'm assuming it still affects the current
> version

Actually I don't think this would work even to a Windows server.

The wildcard is only allowable in the last component of a path.
Otherwise it's incredibly expensive to do this search, and doesn't
match a search within an open directory file handle (which is
what Windows does internally when doing a FindFirst).


More information about the samba mailing list