WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ftp not working???? versions 3.5, 3.6, 3.7 etc.  (Read 5743 times)

Offline grandma

  • Full Member
  • ***
  • Posts: 213
  • Never forget Grandma Loves You & made that candy4U
    • Back when a 10MB HD was $500 bucks
ftp not working???? versions 3.5, 3.6, 3.7 etc.
« on: July 12, 2011, 07:48:31 PM »
I tried typing

FTP and ftp

at a prompt - nothing...

then tried installing coreutils and repeating this

nothing...

Does TC include an ftp command line that is scriptable - i.e. the way DOS operates works like this

a) develop a ftp script such as myquick.ftp

ftp
myusername
mypassword
bi
cd afolder
send afile.txt
bye

b) then a bat file called doftp.bat

REM ONE LINE BAT FILE
ftp /s myquick.ftp

and ftp will automatically grab the contents in the ftp script file and execute

I'm sure linux can do this - thought it was in coreutils or busybox - but got no response (not found) when executed







~ Luv Grandma
"When children of all nations
play in the sandbox together
all morning-all day-all week, and
one fine sunny day; all year long ...
... then war will become an ancient memory
and Grandma can knit that sweater
you'll hold near to your heart
until long after you're my age.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: ftp not working???? versions 3.5, 3.6, 3.7 etc.
« Reply #1 on: July 12, 2011, 11:15:29 PM »
There is no 'ftp' client in the Core, but serveral CLI extensions (e.g. 'cftp.tcz', 'inetutils.tcz' and 'lftp.tcz') exists that contain one.

I'm not so sure about the scripting support for the first two options, but 'lftp' looks quite flexible in this regard as these three little samples here demonstrate:
Code: [Select]
tc@box:~$ echo 'get latest' | lftp ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux
tc@box:~$ ls -l latest ; cat latest
-rw-r--r--    1 tc       staff            6 Jul  3 06:30 latest
3.7.1

tc@box:~$ rm -f latest
tc@box:~$ lftp -c get ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/latest
tc@box:~$ ls -l latest ; cat latest
-rw-r--r--    1 tc       staff            6 Jul  3 06:30 latest
3.7.1

tc@box:~$ rm -f latest
tc@box:~$ echo 'open ftp://distro.ibiblio.org/pub/linux/distributions/tinycorelinux' > lftp_cmds
tc@box:~$ echo 'get latest' >> lftp_cmds
tc@box:~$ lftp -f lftp_cmds
tc@box:~$ ls -l latest ; cat latest
-rw-r--r--    1 tc       staff            6 Jul  3 06:30 latest
3.7.1

Offline ixbrian

  • Retired Admins
  • Sr. Member
  • *****
  • Posts: 436
Re: ftp not working???? versions 3.5, 3.6, 3.7 etc.
« Reply #2 on: July 12, 2011, 11:22:17 PM »
In addition to the extensions that maro pointed out, Tiny Core base includes "ftpput" and "ftpget" which are scriptable.   If you just type those commands in a terminal window and press enter it will display the syntax for the commands. 

Offline combo3

  • Full Member
  • ***
  • Posts: 148
Re: ftp not working???? versions 3.5, 3.6, 3.7 etc.
« Reply #3 on: July 12, 2011, 11:42:28 PM »
using inetutils

ftp -inv <script &  {see: ftp --help}

where script (a plain text file) contains:

open ftp.domain.com
user mylogin mypasswd
lcd /path-to-my-local-dir
send myfile
bye
quit

Offline andrewb

  • Full Member
  • ***
  • Posts: 121
Re: ftp not working???? versions 3.5, 3.6, 3.7 etc.
« Reply #4 on: July 13, 2011, 01:06:05 AM »
TC uses busybox for a lot of commmands. The ftp command in busybox is tftp

Offline ixbrian

  • Retired Admins
  • Sr. Member
  • *****
  • Posts: 436
Re: ftp not working???? versions 3.5, 3.6, 3.7 etc.
« Reply #5 on: July 13, 2011, 01:23:35 AM »
TC uses busybox for a lot of commmands. The ftp command in busybox is tftp

Tiny Core base includes a TFTP server and client, however TFTP and FTP are different protocols and are not compatible with each other (i.e. you can't use a tftp client to connect to an ftp server)
« Last Edit: July 13, 2011, 01:25:41 AM by ixbrian »

Offline pugliese

  • Newbie
  • *
  • Posts: 35
Re: ftp not working???? versions 3.5, 3.6, 3.7 etc.
« Reply #6 on: July 13, 2011, 11:32:53 AM »
In case you need secure ftp there is also Openssh which gives you ssh and sftp. 

Offline grandma

  • Full Member
  • ***
  • Posts: 213
  • Never forget Grandma Loves You & made that candy4U
    • Back when a 10MB HD was $500 bucks
Re: ftp not working???? versions 3.5, 3.6, 3.7 etc.
« Reply #7 on: July 15, 2011, 05:05:39 PM »
you gents are great - thank you - the inetutils example seems to be the closest I am used to

as for ssh methods - I will try them - always wished I had that - but many ftp clients don't support it - perhaps eventually I can use that on our server...
~ Luv Grandma
"When children of all nations
play in the sandbox together
all morning-all day-all week, and
one fine sunny day; all year long ...
... then war will become an ancient memory
and Grandma can knit that sweater
you'll hold near to your heart
until long after you're my age.

Offline netnomad

  • Hero Member
  • *****
  • Posts: 1026
Re: ftp not working???? versions 3.5, 3.6, 3.7 etc.
« Reply #8 on: July 15, 2011, 07:19:15 PM »
hi grandma,

ssh is really one of the most important connection tools:
just play around to connect to a server, than start to transfer files and later begin to tunnel different ports and services through unscecure environments like the internet... perhaps additionally secured by fail2ban.
it's amazing how endless are the opportunities of ssh and it's tools.
perhaps you give it a try, but there are some further interesting tools that base on or include the ssh framework:
f.e.
rsync                   to sync files or whole systems on different hosts
unison                 a gui tool that does the same thing in mixed environments with win, mac and linux
rsnapshot            to get snapshots of your data plus something like a history of different versions.
sshfs                   to avoid poorly secured samba- or nfs-server-configurations
and so on.
give it a try, it' s really worth!
 
« Last Edit: July 15, 2011, 07:22:55 PM by netnomad »