[Samba] Getting 8.3 samba short filenames in linux

Andrew Bartlett abartlet at samba.org
Tue Sep 4 02:17:13 MDT 2012

On Sat, 2012-09-01 at 13:07 +0100, Dominic Raferd wrote:
> From a windows client it is easy and fast to obtain from a samba share 
> both the long filenames and the short 8.3 names by using DIR /x. Is 
> there a way for a Linux client to obtain this same information swiftly 
> for a large directory listing - or indeed for the samba server to show 
> this information? The only way I have found is using smbclient's altname 
> function but I seem to have to call this individually for each file, 
> which makes it very slow.
> [In case you are wondering why anyone should want this info, it is to do 
> with an old DOS program which accesses a samba share.]

You can script smbclient using '-c'

Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org

More information about the samba mailing list