How to upload some pages to ftp server?

How to upload some pages to ftp server?

Post by segus » Tue, 27 Aug 2002 22:17:39


Hello,
I have a question which should take only a while for you to answer.

I am looking for a command-line tool to upload my web site (a bunch of html
pages) to the remote ftp server.
I would like to replace only the files which are older than those in my
local directory.

What tool can I use?
ftp maybe? Or maybe rsync?

Thank you very much.

Maurizio

 
 
 

How to upload some pages to ftp server?

Post by Joe Fredrickso » Tue, 27 Aug 2002 22:32:57


On Mon, 26 Aug 2002 11:17 pm, seguso posted to comp.os.linux.misc the
following blurb ::

Quote:> Hello,
> I have a question which should take only a while for you to answer.

> I am looking for a command-line tool to upload my web site (a bunch of
> html pages) to the remote ftp server.
> I would like to replace only the files which are older than those in my
> local directory.

> What tool can I use?
> ftp maybe? Or maybe rsync?

> Thank you very much.

> Maurizio

ftp servername
password required: *******
PUT -i /home/user/webs/* /*
quit

man ftp

--
cheerio

Registered Linux User 282072
<www.volutin.net -- everything irrelevent (coming soon)>

 
 
 

How to upload some pages to ftp server?

Post by bjjgrapple » Tue, 27 Aug 2002 22:41:08



> On Mon, 26 Aug 2002 11:17 pm, seguso posted to comp.os.linux.misc the
> following blurb ::

>> Hello,
>> I have a question which should take only a while for you to answer.

>> I am looking for a command-line tool to upload my web site (a bunch of
>> html pages) to the remote ftp server. I would like to replace only the
>> files which are older than those in my local directory.

>> What tool can I use?
>> ftp maybe? Or maybe rsync?

>> Thank you very much.

>> Maurizio

> ftp servername
> password required: *******
> PUT -i /home/user/webs/* /*
> quit

you can use the ncftpput.  This can be used in scripts, etc.

- Show quoted text -

Quote:

> man ftp

 
 
 

How to upload some pages to ftp server?

Post by Dan Espe » Wed, 28 Aug 2002 00:37:08




> > On Mon, 26 Aug 2002 11:17 pm, seguso posted to comp.os.linux.misc the
> > following blurb ::

> >> Hello,
> >> I have a question which should take only a while for you to answer.

> >> I am looking for a command-line tool to upload my web site (a bunch of
> >> html pages) to the remote ftp server. I would like to replace only the
> >> files which are older than those in my local directory.

> >> What tool can I use?
> >> ftp maybe? Or maybe rsync?

> >> Thank you very much.

> >> Maurizio

> > ftp servername
> > password required: *******
> > PUT -i /home/user/webs/* /*
> > quit

> you can use the ncftpput.  This can be used in scripts, etc.

That doesn't seem to handle the requirement to only upload
files that have changed.

I find using a .netrc and a makefile easiest.
Heres an example makefile:

uploads:=index.html page1.html
targets:=$(addsuffix .uploaded,$(uploads))

all: $(targets)

define install_html
(\
echo "binary\n"\

 "close\n"\
 "quit\n"\
) | ftp host.for.upload.net
endef

%.uploaded: %
        $(install_html)

clean:
        rm *.uploaded

(Change "x" to reflect the files you want to upload,
and host.for.upload.net as needed.)

 
 
 

How to upload some pages to ftp server?

Post by segus » Wed, 28 Aug 2002 00:56:05


Hi Dan,

> That doesn't seem to handle the requirement to only upload
> files that have changed.

> I find using a .netrc and a makefile easiest.
> Heres an example makefile:

> uploads:=index.html page1.html
> targets:=$(addsuffix .uploaded,$(uploads))

> all: $(targets)

> define install_html
> (\
> echo "binary\n"\

>  "close\n"\
>  "quit\n"\
> ) | ftp host.for.upload.net
> endef

> %.uploaded: %
> $(install_html)

> clean:
> rm *.uploaded

Thanks a lot for your help.
Too bad I don't know the syntax of makefiles enough as to understand what
you wrote.
I'm studying it though.

Quote:> (Change "x" to reflect the files you want to upload,

Sorry, I can't see the "x" :-P

Quote:> and host.for.upload.net as needed.)

Er... by any chance, does a solution exist which doesn't involve
programming and uploads only newer files? :-)

Thanks again,
bye

 
 
 

How to upload some pages to ftp server?

Post by bjjgrapple » Wed, 28 Aug 2002 01:33:47


Quote:> Er... by any chance, does a solution exist which doesn't involve
> programming and uploads only newer files? :-)

ncftpput
 
 
 

How to upload some pages to ftp server?

Post by Dan Espe » Wed, 28 Aug 2002 02:25:36



> Hi Dan,

> > That doesn't seem to handle the requirement to only upload
> > files that have changed.

> > I find using a .netrc and a makefile easiest.
> > Heres an example makefile:

> > uploads:=index.html page1.html
> > targets:=$(addsuffix .uploaded,$(uploads))

> > all: $(targets)

> > define install_html
> > (\
> > echo "binary\n"\

> >  "close\n"\
> >  "quit\n"\
> > ) | ftp host.for.upload.net
> > endef

> > %.uploaded: %
> > $(install_html)

> > clean:
> > rm *.uploaded

> Thanks a lot for your help.
> Too bad I don't know the syntax of makefiles enough as to understand what
> you wrote.
> I'm studying it though.

You should be able to just cut in paste it into a file
named "Makefile" (or "makefile"), then
type "make" in the directory containing the makefile
and your html files.

Quote:

> > (Change "x" to reflect the files you want to upload,

> Sorry, I can't see the "x" :-P

Sorry, in this case, I meant "uploads".

Quote:> > and host.for.upload.net as needed.)

> Er... by any chance, does a solution exist which doesn't involve
> programming and uploads only newer files? :-)

This falls a little short of programming.
It can confuse you with some funny messages, but its not too bad.

Heres a quick run down:

 uploads:=index.html page1.html

(sets the names of the html files to upload to a variable
named "uploads".  ":=" is assignment in a makefile.

 targets:=$(addsuffix .uploaded,$(uploads))

derives the names of the target files from the variable
"uploads".  Ie. the targets are index.html.unploaded and
page1.html.uploaded.

 all: $(targets)

Declares the first target (the default target) "all" to
be created from "targets".

 %.uploaded: %
        $(install_html)

Defines a rule for making a target file (%.uploaded) from
any file {%).

There are 2 lines in the rules, each rule line MUST be preceeded
by a tab.

The first line runs the macro defined above it.

for the target.  The content of the target file is
arbitrary, the timestamp on the file is what counts.

What happens is that make checks its targets,
including "index.html.uploaded", finds the rule to make
it, and figures out its made from "index.html".
Thats the
%.uploaded: %
line.

Then compares the timestamp of index.html vs. index.html.uploaded.
If index.html has been updated, it runs the rule to remake
index.html.uploaded.

I don't know of anything simpler.

 
 
 

How to upload some pages to ftp server?

Post by segus » Wed, 28 Aug 2002 07:03:03



>> Er... by any chance, does a solution exist which doesn't involve
>> programming and uploads only newer files? :-)

> ncftpput

Thank you very much. I'm sorry for having you repeat yourself. I had given
a glance to the man page and it seemed to me like it could not upload newer
files only.

bye,

Maurizio

 
 
 

How to upload some pages to ftp server?

Post by segus » Wed, 28 Aug 2002 20:32:25



>> Er... by any chance, does a solution exist which doesn't involve
>> programming and uploads only newer files? :-)

> ncftpput

Well, in the man page I couldn't find any option to upload newer files only.
It keeps overwriting all the files each time.

my commandline is

ncftpput -R -E -u seguso -p mypassword ftp.digiland.it /      
/home/maurizio/my.web.site/*

any hints welcome.

Maurizio

 
 
 

1. Can't upload web page via FTP

Hello,
I'm using RedHat 8.0 and Apache to host a web site but I can't upload
to the /var/www/html subdirectory over FTP. I can upload to the
/home/[user] or /home/ftp/uploads but not the web site subdirectory.

The ftpaccess file I setup is patterned after the WU-FTP howto for
"incoming":

upload /var/www/html *  yes ftpadmin ftpadmin dirs

This doesn't work however and gives a "Permission denied" message.

Any suggestions?
Thanks in advance,
T. Johns

2. Is there a way to find the total execution time for a program

3. Cronjob moves files from ftp upload directory before upload is complete

4. TCP/IP drop after 5 minutes.

5. Help with ftp server config - 550: Permission Denied (Upload Dirs)

6. RH Setup on HPT370

7. anonymous upload on ftp server

8. Linux equiv (supervoice/bitware)

9. Unable to upload to ftp server

10. Cannot upload to ftp server

11. Anon FTP - Can't upload to Linux Server

12. ftp server ignoring noretrieve and upload

13. Can't upload (via FTP) to a Proxy Apache Server...