[Samba] smbclient -c options

Joel Hammer Joel at HammersHome.com
Thu May 15 20:32:23 GMT 2003


After you log on with smbclient,
run help
You will see all the commands that smbclient can do. 
du is among them.

Joel

On Thu, May 15, 2003 at 03:10:03PM -0400, Mark_Saunders wrote:
> Excellent - Thanks.
> But...
> At the bottom of the list is NOT a space utilization for the 
> subdirectory structure that was listed...
> It's a volume-wide value:
>  52060 blocks of size 4194304. 51822 blocks available (this is for the 
> entire volume, not just the dir listed)
> Now that I have the file count, any idea as to how to get the block 
> usage for only the listed files?
> 
> Joel Hammer wrote:
> 
> >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
> >>    
> >>
> >
> >  
> >
> 
> -- 
> 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