[Samba] smbclient -c options
Joel Hammer
Joel at HammersHome.com
Thu May 15 18:56:07 GMT 2003
man smbclient
/ recurse
Although it says recurse is for mget and mput, it works for ls, too.
So, this works for me:
smbclient //server/share -c 'recurse;ls' | wc -l
Joel
On Thu, May 15, 2003 at 11:52:16AM -0400, Mark_Saunders wrote:
> I'm trying to get a recursive file listing with smbclient:
> smbclient //host/share -Uusername%password -c "ls -alFR"
> But I get an error:
> NT_STATUS_NO_SUCH_FILE listing \-alFR
> Evidently, smbclient thinks I'm asking for a file mask.
>
> Is there a way to get a recursive file listing on a samba share so I can
> pipe it to wc -l for a file count?
>
> Ideally, I'd like to:
> (This won't work, but you get the idea...)
> smbclient //host/share -Uusername%password -c "ls -alFR | wc -l"
>
> Thanks!
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: http://lists.samba.org/mailman/listinfo/samba
More information about the samba
mailing list