Copy a file from Linux

Hi Experts,

I want to copy a file from a Linux machine to another Linux machine or a windows machine shared drive.

I mean to say..

cp filename //hostname/shareddrive

I don't want to mount. Is there any way we can do it.

Regards
Naree

try scp

scp username@sourcemachine:<path of the source machine> <target machine path>

If you have SCP,

on host1:

scp filename user@host2:/path/to/copy
# scp myfile.zip remoteuser@remotehost:/remote_path/

for linux you know a valid user password and its has to write perm in dir
for windows you can install openssh server (or you can ftp)

I don't want to use scp as well. I know i can do it with scp. Is there anyway apart from scp.

I appreciate your help. But can you please have other than it.

Regards
Naree

---------- Post updated at 02:51 PM ---------- Previous update was at 02:50 PM ----------

Sir,

I don't want to use scp as well. Can you please suggest me anyother utility.

Regards
Naree

Then you need think about Samba, or ftp.

Sir,

I have read about Samba. But it says you need to mount the drive in your local machine.

But i want to avoid mounting.

Can you please guide me. I will follow it.

Regards
Naree

---------- Post updated at 02:58 PM ---------- Previous update was at 02:55 PM ----------

Sir,

FTP not allowed.

I have read about Samba. But it says you need to mount the drive in your local machine.

But i want to avoid mounting.

Can you please guide me. I will follow it.

Regards
Naree

---------- Post updated at 03:45 PM ---------- Previous update was at 02:58 PM ----------

Any Help ???

Please .....

Regards
Naresh

This is becoming a quiz show. When you already know which protocols/tools are not possible to be used, then please list them all here instead having people guessing around, ty. This could speed it up if you want a quick solution.

Hi Experts,

Sorry if I had breached any rules of Forum. For the above Thread. I don't Want to use scp,mount and ftp.

So please suggest me.

Regards
Naree

Hi,
well You could use rsync, rcp, netcat, wget/wput (with something other than ftp, http for example), uucp and I guess quite a lot of others to choose from. It all depends on what protocols are supported on both Your computers.
If You have specific reasons for not allowing some protocols, I guess You can easily determine if any of the others are a viable option for You.

Best regards,
Lakris

PS A last resort could of course be a USB drive or similar external device? :wink:

try this :wink:

# rsync -avr --no-whole-file /local_path/myfile user@remotehost:/remote_path/

Thanks to All.

But i don't want to use any protocols . If there is anyother way please tell me.

Regards
Naree

As soon as you have to copy something over a network, you have to use a protocol, unless you want to code something up yourself. And even then you'll probably define some protocol yourself.

telnet and cat perhaps???

Pen and paper?

1 Like

good idea :slight_smile:

Seriously though.

How big is the file?
Is the file a basic text file or something else like a database?
Are you trying to achieve this from a Linux command line or from a Windows Terminal emulation package (if so, which package)?
What version of Linux?
What version of Windows?

Since you were given the option of scp, why do you not want to do that? You can use python's built in webserver

python -m SimpleHTTPServer

when in the directory you wish to share and then you can use wget or a browser to pull the files

However, that seems more complex than just scp. What is your aversion to it?

You have a fundamental misunderstanding of the meaning of 'protocol'. They're what make communication of any sort possible. You have to have one!

we have rsync and rcp commands for the remote file assessing.
u can try with that