% ftp -i ftp.foo.org
> mput *.html
Hi there I just like using the terminal 🙂
tidyboy said:If I ftp a .zip file what are the commands to unzip the archive please.
Yeah me too. Have you cinsidered using 'scp' rather than 'ftp', depends if you server supports it obviously. 'scp' can handle recursive coppies fine.
You need to unzip them on the server, you can't do it via ftp. Log on to the server and just use 'unzip'
Can you explain about scp please. And how to use commands for it
% man scp
stop being lazy.Code:% man scp
Im not being lazy I am new to all this and I need help.
unless you zip up the folder, you'll have to do it in two steps: create the remote folder, then put all the files.
the trick is to start ftp with the -i flag, which will turn off interactive mode:
Code:% ftp -i ftp.foo.org
after you've gotten to the correct folder, you'll use mput (multiple put) instead of normal put. use wildcards to match the files in your local directory:
Code:> mput *.html
if you leave interactive mode on, you'll be prompted for each file it finds.
Hi there Thanks for replying.
Yes I can get the put and get commands working but when I use them it only ftp's the files and not the folders.
What am I doing wrong?
MAtt
You're not reading what he wrote precisely.
The man pages definitely have more information.
OK, say you're sitting in a directory and you have a folder called "pictures" that you want to FTP. Here's how you do it. Watch closely...
ftp myserver.com
(login as needed)
prompt
(FTP says "Interactive mode off.")
lcd pictures
(FTP says "Local directory now /blah/blah/pictures")
mkdir pictures
(FTP says "pictures: the directory was successfully created")
cd pictures
(FTP says "OK. Current directory is /www/blah/pictures")
mput *
(FTP uploads every file in the directory)
Make sense now?
Hi there thanks for replying
I understand what you are saying in your example but what I am tyring to do is ftp the invision power board forum software files to my server.
I need to keep the directory structure so how do I ftp the whole thing over.
Hi there thanks for replying
I understand what you are saying in your example but what I am tyring to do is ftp the invision power board forum software files to my server.
I need to keep the directory structure so how do I ftp the whole thing over.
You are in for a long night.
mkdir forum
cd forum
lcd forum
mput *
mkdir bin
cd bin
lcd bin
mput *
cd ..
lcd ..
mkdir images
cd images
lcd image
mput *
...
And so on. One set of mkdir/cd's/mput's for every single directory. And don't forget to chmod the directories correctly, some will be 755, some 777... don't get that wrong or you'll have a non-working board, or a huge security risk, or both.
I've done it. It's tedious. Do you REALLY want to use the terminal ftp for this? You should consider a GUI app that will take care of that for you, or scp, or... something.
Thanks thats what I thought 🙂