Apologies I know this is a well covered question, but I cant seem to find any simple solutions…
Trying to get a problem sorted out and im hoping that somone will be able to assist.
Im creating a script and the only way I can think of to resolve this particular problem is by FTP’ing a file to a remote web server.
.sh script, I tried FTP initially but there appears to be a problem with doing this to do with passwords, I tried a couple of workarounds but this didnt work.
I have then tried wput but that seems to fail as well.
#!/bin/sh
wput -v file.php ftp://usr:pass@host.co.uk/docroot/
bash wput.sh
wput.sh: line 2: $'\r': command not found
--12:20:58-- `/file.php'
=> ftp://user:xxxxx@host.co.uk/docroot/
Connecting to host.co.uk:21... connected!
Logging in as user ... Logged in!
==> CWD docroot
==> TYPE I ... done.
... failed.
==> SYST ... done (UNIX Type: L8).
==> PASV ... done.
==> TYPE A ... done.
==> LIST ... done.
==> TYPE I ... done.
==> PASV ... done.
' not understood) Skipping this file
FINISHED --12:20:59--
Transmission of 1 file failed.
wput.sh: line 4: $'\r': command not found
wput.sh: line 5: $'\r': command not found
Is anyone able to tell me where I’m going wrong. Could this be a file permissions issue or something?
All I need is the simplist solution for transfering a file from my computer to some web space automatically in the simpist way possible.
Thanks
Try to use
ncftpput:Examples showing in
ncftpputhelp menu: