LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Transfer 1 file (https://www.linuxquestions.org/questions/linux-software-2/transfer-1-file-509853/)

DoDo1975 12-12-2006 06:33 PM

Transfer 1 file
 
Hi,

I am trying to build a script that will prompt for file upload, then wait while someone uploads 1 file. On completion, the script would then close.

I could probably start an ftp daemon, but then I think I would have to close it manually at completion of file upload.

I suspect maybe there is an easier way. I don't need to use ftp, I could something else as long as a download wouldn't be required.

Can anyone help?

Thanks,

Joel

IBall 12-12-2006 06:34 PM

You could use scp, assuming that SSH connections are accepted on the remote machine.

--Ian

DoDo1975 12-12-2006 08:47 PM

Yes, ssh connections are accepted. I have been trying to read a little about scp since I posted to see if its right.

Here is scenario.

My target is an embedded system with no hard drive. I have 32 Megs memory, or which 9 megs is already being used up as a ramdisk. I need to be able to upload firmware upgrades and then run them. The files then might be up to 8 megs. I dont want to leave 8 megs free space on my system as this would chew up significant percentage of ram so I created a 8 Meg ramdisk that is empty but can be mounted when needed.

So I want this.

When scp asks to upload file I want to mount the ramdisk before uploading file. Is there a way to have scp do this, to run a command before initialising the transfer?

DoDo1975 12-13-2006 01:47 PM

up to top!!

matthewg42 12-13-2006 02:18 PM

Send the mount command with ssh first, then send the file using an scp command.


All times are GMT -5. The time now is 02:55 PM.