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!
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Le Jeudi 15 Mai 2003 17:52, Mark_Saunders a ?crit :> 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? >you could also mount it as smbfs and do a find | wc -l - -- *********************************** david.morel@amakuru.net OpenPGP public key: http://www.amakuru.net/dmorel.asc 28192ef126bc871757cb7d97f4a44536 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+w9ujqr7QF98duCMRAhbhAJ0crGWmuHUZoXpNTDeNhvFTPaXaXACeLFY9 J0FVa5BNHcb5F75Pop5PHJQ=9FA/ -----END PGP SIGNATURE-----
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