Re: OT: How transfer files from linux to windows?
At Sun, 26 Oct 2025 15:21:16 -0400 The Wanderer <wanderer@fastmail.fm> wrote:
>
> On 2025-10-26 at 14:37, Hans wrote:
>
> >> I might be missing something here, why don't you use the SMB
> >> protocol?
> >
> > Well, I did not say, that I do not want to use it? I said, I do not
> > want to add an extra(!) protocol.
> >
> > Maybe I expressed myself not correctly. I just want to copy without
> > any change of the target windows system by using a commandline in the
> > shell. And looking for a syntax or a way, how to do it.
>
> In order to copy to a remote system, you have to interact with a program
> that's running on the remote system.
>
> If you aren't willing to set up - on the Windows system - a program
> that's intended for the purpose, you're going to be limited to the stuff
> that's built in to Windows.
>
> As far as I'm aware, that's SMB, which is - for practical purposes -
> also to say CIFS.
>
>
> Windows-to-Windows can do copying like that with a bare command (not
> requiring an explicit mount), such as
> xcopy C:\path\to\source.file \\remote\share\path\to\destination.file
> , as long as the credentials set up in the environment are valid for
> accessing the remote share - but even that, I'm nearly positive,
> effectively does an implicit mount of some type. (And it does use the
> SMB/CIFS protocol.)
>
> Under Linux, in order to copy or browse or whatever, you have to have a
> path to copy or browse *to*. That requires specifying where in the
> existing filesystem to put that path - and doing that is, itself, a
> mount operation.
No, you don't actually need to mount anything --
smbclient will do the copy without having to implement a CIFS mount.
smbclient is a CLI tool, you can include the "copy" command on its command
line or start it up as an interactive (terminal) process. Basicly it is just
like ftp (sort of).
man 1 smbclient
for all of the (gory) details.
>
> Unless you're willing to set up a daemon on the Windows side which will
> handle the communication itself, bypassing filesystem syntax etc.,
> you're not going to be able to get away without an explicit mount step.
>
--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller@deepsoft.com -- Webhosting Services
Reply to: