RE: [SLUG] ftp client - MORE

2002-03-15 Thread Bernhard Lüder

I think I have got the solution now. There was a bug in the PURE-FTPD
version I used.

Regards
Bernhard

-Original Message-
From: Grant Parnell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 14 March 2002 22:29
To: Bernhard Lüder
Cc: SLUG user group
Subject: RE: [SLUG] ftp client - MORE


Actually two things would be best
1) use rsync to send to the remote server.
2) I think you said it was bigpond so rsync won't work, try a package
called 'mirror'. It's generally used for sucking down sites but can go the
other way as well. It'll handle your directory structure without too much
effort on your part. It's also just a perl script so fix it if it doesen't
quite fit what you want.


On Wed, 13 Mar 2002, Bernhard Lüder wrote:

> What I am actually trying to do is to backup file from my site to an FTP
> server.
>
> The problem is, that they are allowed to create sub-directories and of
> course new files.
>
> So I don't know what files I have to ftp.
>
> I have tried using WEEX, but it does not seem to be able to create new
> directories on the FTP server.
>
> Bernhard
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Jill Rowling
> Sent: Wednesday, 13 March 2002 10:13
> To: SLUG user group
> Subject: RE: [SLUG] ftp client - MORE
>
>
> Just use the full pathname and get a script to generate the list for you,
eg
> 'find'.
> But you need to know if the directory exists on the remote site.
>
> Anyone know, assuming a shell is not available to the remote host, can you
> test for the existance of a directory on an ftp site in order to make a
> decision as to whether to make a directory or not?
> Something like if [ -d ] dirname ; then do something ; fi
> but using ftp as the only available protocol?
>
> (Actually come to think of it you could possibly use http to first test
for
> this directory's existence if the ultimate aim was to update your
website).
>
> Regards,
>
> Jill.
>
> --
> Jill Rowling, Snr Des. Eng. & Unix System Administrator
> Eng. Systems Dept, Aristocrat Technologies Australia
> Level 2, 55 Mentmore Ave Rosebery NSW 2018
> Phone: (02) 9697-4484 Fax: (02) 9663-1412 Email: [EMAIL PROTECTED]
>
>
>
> -Original Message-
> From: Bernhard Lüder [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 12 March 2002 22:07
> To: Peter Hardy; SLUG user group
> Subject: [SLUG] ftp client - MORE
>
>
> Ok, that works for known files, but what if I have to upload new
directories
> & folders with files in them?
>
> Is there a recursive feature in ftp?
>
> Bernhard
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Peter Hardy
> Sent: Tuesday, 12 March 2002 19:33
> To: SLUG user group
> Subject: Re: [SLUG] ftp client
>
>
> On Tue, 2002-03-12 at 18:50, Bernhard Lüder wrote:
> > Can I use the native RedHat ftp client to automate this task?
> > How do I get it to log in as a user, then transfer files and the log out
> > after?
>
> It's fairly easy to use ftp in shell scripts.  I used to use the
> following to upload webcam images to the webserver.
>
> uploadpic() {
> ftp -v -i -n $host < user $ftpuser $ftppasswd
> binary
> put $localfilename $remotefilename
> bye
> EOF
> }
>
> HTH,
> --
> Peter
>
>
> --
> CONFIDENTIALITY NOTICE
> --
> This email is intended only to be read or used by the addressee.
> The information contained in this e-mail message may be confidential
> information. If you are not the intended recipient, any use, interference
> with, distribution, disclosure or copying of this material is unauthorised
> and prohibited. Confidentiality attached to this communication is not
waived
> or lost by reason of the mistaken delivery to you.
>
> If you have received this message in error, please delete it and notify us
> by return e-mail or telephone Aristocrat Technologies Australia Pty
Limited
> on +61 2 9413 6300.
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
>
>

--
--
Web: www.arcadia.au.com/gripz
Answering Machine/fax: 02 4950 1194 (wait 5 mins if no answer)
Mobile: 0408 686 201

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



RE: [SLUG] ftp client - MORE

2002-03-14 Thread Grant Parnell

Actually two things would be best
1) use rsync to send to the remote server.
2) I think you said it was bigpond so rsync won't work, try a package 
called 'mirror'. It's generally used for sucking down sites but can go the 
other way as well. It'll handle your directory structure without too much 
effort on your part. It's also just a perl script so fix it if it doesen't 
quite fit what you want.


On Wed, 13 Mar 2002, Bernhard Lüder wrote:

> What I am actually trying to do is to backup file from my site to an FTP
> server.
> 
> The problem is, that they are allowed to create sub-directories and of
> course new files.
> 
> So I don't know what files I have to ftp.
> 
> I have tried using WEEX, but it does not seem to be able to create new
> directories on the FTP server.
> 
> Bernhard
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Jill Rowling
> Sent: Wednesday, 13 March 2002 10:13
> To: SLUG user group
> Subject: RE: [SLUG] ftp client - MORE
> 
> 
> Just use the full pathname and get a script to generate the list for you, eg
> 'find'.
> But you need to know if the directory exists on the remote site.
> 
> Anyone know, assuming a shell is not available to the remote host, can you
> test for the existance of a directory on an ftp site in order to make a
> decision as to whether to make a directory or not?
> Something like if [ -d ] dirname ; then do something ; fi
> but using ftp as the only available protocol?
> 
> (Actually come to think of it you could possibly use http to first test for
> this directory's existence if the ultimate aim was to update your website).
> 
> Regards,
> 
> Jill.
> 
> --
> Jill Rowling, Snr Des. Eng. & Unix System Administrator
> Eng. Systems Dept, Aristocrat Technologies Australia
> Level 2, 55 Mentmore Ave Rosebery NSW 2018
> Phone: (02) 9697-4484 Fax: (02) 9663-1412 Email: [EMAIL PROTECTED]
> 
> 
> 
> -Original Message-
> From: Bernhard Lüder [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 12 March 2002 22:07
> To: Peter Hardy; SLUG user group
> Subject: [SLUG] ftp client - MORE
> 
> 
> Ok, that works for known files, but what if I have to upload new directories
> & folders with files in them?
> 
> Is there a recursive feature in ftp?
> 
> Bernhard
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Peter Hardy
> Sent: Tuesday, 12 March 2002 19:33
> To: SLUG user group
> Subject: Re: [SLUG] ftp client
> 
> 
> On Tue, 2002-03-12 at 18:50, Bernhard Lüder wrote:
> > Can I use the native RedHat ftp client to automate this task?
> > How do I get it to log in as a user, then transfer files and the log out
> > after?
> 
> It's fairly easy to use ftp in shell scripts.  I used to use the
> following to upload webcam images to the webserver.
> 
> uploadpic() {
> ftp -v -i -n $host < user $ftpuser $ftppasswd
> binary
> put $localfilename $remotefilename
> bye
> EOF
> }
> 
> HTH,
> --
> Peter
> 
> 
> --
> CONFIDENTIALITY NOTICE
> --
> This email is intended only to be read or used by the addressee.
> The information contained in this e-mail message may be confidential
> information. If you are not the intended recipient, any use, interference
> with, distribution, disclosure or copying of this material is unauthorised
> and prohibited. Confidentiality attached to this communication is not waived
> or lost by reason of the mistaken delivery to you.
> 
> If you have received this message in error, please delete it and notify us
> by return e-mail or telephone Aristocrat Technologies Australia Pty Limited
> on +61 2 9413 6300.
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
> 
> 

-- 
-- 
Web: www.arcadia.au.com/gripz 
Answering Machine/fax: 02 4950 1194 (wait 5 mins if no answer)
Mobile: 0408 686 201

--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



Re: [SLUG] ftp client - MORE

2002-03-14 Thread Mike Lake

On Tue, Mar 12, 2002 at 10:07:20PM +1100, Bernhard L?der wrote:
> Ok, that works for known files, but what if I have to upload new directories
> & folders with files in them?
> Is there a recursive feature in ftp?

Unfortunately not. I have included a perl script that I wrote last week when suddenly 
my shell access was turned off by my web provider. This does not create any 
directories but its easy to add to this script if needed.  It uses ftp rather than 
having to worry about Net::ftp in Perl. Was a quick 20 min hack.
Note that you can use a .netrc file but it probably safer not to. If it is not there 
the ftp will just ask for the passwd.

#!/usr/bin/perl -w

use strict;

my $localDir= "/home/mikel/public_html/speleonics/"; 
my $remoteDir   = "/home/mikel/public_html/";

my $i;
my @changedFiles;
my $ftpuploadFile = "/tmp/ftpupload.myisp";

print "\n";
print "\n";
print "*** FTP upload to My ISP ***\n";
print "\n\n";

print "FTP transfer uses file .netrc to connect to ISP.\n";
print "Local directory to upload files FROM will be: $localDir\n";
print "Remote directory to upload files TO  will be: $remoteDir\n";

@changedFiles = `find $localDir -type f -mtime -7`;



# Write the ftp script


open(FILE, ">$ftpuploadFile") || die "Can't open file: $!";

print FILE "open tazieff\n";
print FILE "prompt\n";
print FILE "lcd $localDir\n";
print FILE "cd $remoteDir\n";

print "\nAdding files to ftp script to upload...\n";
foreach $i (@changedFiles)
{
$i =~ s/$localDir//;
print "file: $i";
print FILE "put $i";
}

print FILE "close\n";
print FILE "bye\n";

close (FILE);

print "\nRunning ftp upload now... (watch for errors below here)\n";
print `ftp < $ftpuploadFile`;

print "\nRemember to delete the file $ftpuploadFile when finished.\n";



-- 
Hunt and kill the dangerous animal for my email. [EMAIL PROTECTED]


UTS CRICOS Provider Code:  00099F

DISCLAIMER
=
This email message and any accompanying attachments may contain
confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.
If you have received this message in error, please notify the sender
immediately and delete this message. Any views expressed in this message
are those of the individual sender, except where the sender expressly,
and with authority, states them to be the views the University of
Technology Sydney. Before opening any attachments, please check them for
viruses and defects.
=


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



RE: [SLUG] ftp client - MORE

2002-03-12 Thread Peter Hardy

On Wed, 2002-03-13 at 10:12, Jill Rowling wrote:
> Anyone know, assuming a shell is not available to the remote host, can you
> test for the existance of a directory on an ftp site in order to make a
> decision as to whether to make a directory or not?
> Something like if [ -d ] dirname ; then do something ; fi
> but using ftp as the only available protocol?

I supposed you could just tell it to create the directory, and ignore
any errors it might throw back.

-- 
Peter
[EMAIL PROTECTED]

By now the whole of downtown Morpork was alight, and the richer and
worthier
citizens of Ankh on the far bank were bravely responding by feverishly
demolishing the bridges.
   (Terry Pratchett, The Colour of Magic)

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



Re: [SLUG] ftp client - MORE

2002-03-12 Thread Kerry Seibold

If you are prepared to write a bit of Perl:
look at Net::FTP
Kerry.

- Original Message -
From: "Bernhard Lüder" <[EMAIL PROTECTED]>
To: "Jill Rowling" <[EMAIL PROTECTED]>; "SLUG user group"
<[EMAIL PROTECTED]>
Sent: Wednesday, March 13, 2002 10:39 AM
Subject: RE: [SLUG] ftp client - MORE


> What I am actually trying to do is to backup file from my site to an FTP
> server.
>
> The problem is, that they are allowed to create sub-directories and of
> course new files.
>
> So I don't know what files I have to ftp.
>
> I have tried using WEEX, but it does not seem to be able to create new
> directories on the FTP server.
>
> Bernhard
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Jill Rowling
> Sent: Wednesday, 13 March 2002 10:13
> To: SLUG user group
> Subject: RE: [SLUG] ftp client - MORE
>
>
> Just use the full pathname and get a script to generate the list for you,
eg
> 'find'.
> But you need to know if the directory exists on the remote site.
>
> Anyone know, assuming a shell is not available to the remote host, can you
> test for the existance of a directory on an ftp site in order to make a
> decision as to whether to make a directory or not?
> Something like if [ -d ] dirname ; then do something ; fi
> but using ftp as the only available protocol?
>
> (Actually come to think of it you could possibly use http to first test
for
> this directory's existence if the ultimate aim was to update your
website).
>
> Regards,
>
> Jill.
>
> --
> Jill Rowling, Snr Des. Eng. & Unix System Administrator
> Eng. Systems Dept, Aristocrat Technologies Australia
> Level 2, 55 Mentmore Ave Rosebery NSW 2018
> Phone: (02) 9697-4484 Fax: (02) 9663-1412 Email: [EMAIL PROTECTED]
>
>
>
> -Original Message-
> From: Bernhard Lüder [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 12 March 2002 22:07
> To: Peter Hardy; SLUG user group
> Subject: [SLUG] ftp client - MORE
>
>
> Ok, that works for known files, but what if I have to upload new
directories
> & folders with files in them?
>
> Is there a recursive feature in ftp?
>
> Bernhard
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Peter Hardy
> Sent: Tuesday, 12 March 2002 19:33
> To: SLUG user group
> Subject: Re: [SLUG] ftp client
>
>
> On Tue, 2002-03-12 at 18:50, Bernhard Lüder wrote:
> > Can I use the native RedHat ftp client to automate this task?
> > How do I get it to log in as a user, then transfer files and the log out
> > after?
>
> It's fairly easy to use ftp in shell scripts.  I used to use the
> following to upload webcam images to the webserver.
>
> uploadpic() {
> ftp -v -i -n $host < user $ftpuser $ftppasswd
> binary
> put $localfilename $remotefilename
> bye
> EOF
> }
>
> HTH,
> --
> Peter
>
>
> --
> CONFIDENTIALITY NOTICE
> --
> This email is intended only to be read or used by the addressee.
> The information contained in this e-mail message may be confidential
> information. If you are not the intended recipient, any use, interference
> with, distribution, disclosure or copying of this material is unauthorised
> and prohibited. Confidentiality attached to this communication is not
waived
> or lost by reason of the mistaken delivery to you.
>
> If you have received this message in error, please delete it and notify us
> by return e-mail or telephone Aristocrat Technologies Australia Pty
Limited
> on +61 2 9413 6300.
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
>
> --
> SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
>

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



RE: [SLUG] ftp client - MORE

2002-03-12 Thread Bernhard Lüder

What I am actually trying to do is to backup file from my site to an FTP
server.

The problem is, that they are allowed to create sub-directories and of
course new files.

So I don't know what files I have to ftp.

I have tried using WEEX, but it does not seem to be able to create new
directories on the FTP server.

Bernhard

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Jill Rowling
Sent: Wednesday, 13 March 2002 10:13
To: SLUG user group
Subject: RE: [SLUG] ftp client - MORE


Just use the full pathname and get a script to generate the list for you, eg
'find'.
But you need to know if the directory exists on the remote site.

Anyone know, assuming a shell is not available to the remote host, can you
test for the existance of a directory on an ftp site in order to make a
decision as to whether to make a directory or not?
Something like if [ -d ] dirname ; then do something ; fi
but using ftp as the only available protocol?

(Actually come to think of it you could possibly use http to first test for
this directory's existence if the ultimate aim was to update your website).

Regards,

Jill.

--
Jill Rowling, Snr Des. Eng. & Unix System Administrator
Eng. Systems Dept, Aristocrat Technologies Australia
Level 2, 55 Mentmore Ave Rosebery NSW 2018
Phone: (02) 9697-4484 Fax: (02) 9663-1412 Email: [EMAIL PROTECTED]



-Original Message-
From: Bernhard Lüder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 12 March 2002 22:07
To: Peter Hardy; SLUG user group
Subject: [SLUG] ftp client - MORE


Ok, that works for known files, but what if I have to upload new directories
& folders with files in them?

Is there a recursive feature in ftp?

Bernhard

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Peter Hardy
Sent: Tuesday, 12 March 2002 19:33
To: SLUG user group
Subject: Re: [SLUG] ftp client


On Tue, 2002-03-12 at 18:50, Bernhard Lüder wrote:
> Can I use the native RedHat ftp client to automate this task?
> How do I get it to log in as a user, then transfer files and the log out
> after?

It's fairly easy to use ftp in shell scripts.  I used to use the
following to upload webcam images to the webserver.

uploadpic() {
ftp -v -i -n $host <http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



RE: [SLUG] ftp client - MORE

2002-03-12 Thread Jill Rowling

Just use the full pathname and get a script to generate the list for you, eg
'find'.
But you need to know if the directory exists on the remote site.

Anyone know, assuming a shell is not available to the remote host, can you
test for the existance of a directory on an ftp site in order to make a
decision as to whether to make a directory or not?
Something like if [ -d ] dirname ; then do something ; fi
but using ftp as the only available protocol?

(Actually come to think of it you could possibly use http to first test for
this directory's existence if the ultimate aim was to update your website).

Regards,

Jill.

-- 
Jill Rowling, Snr Des. Eng. & Unix System Administrator
Eng. Systems Dept, Aristocrat Technologies Australia
Level 2, 55 Mentmore Ave Rosebery NSW 2018
Phone: (02) 9697-4484 Fax: (02) 9663-1412 Email: [EMAIL PROTECTED]
 


-Original Message-
From: Bernhard Lüder [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 12 March 2002 22:07
To: Peter Hardy; SLUG user group
Subject: [SLUG] ftp client - MORE


Ok, that works for known files, but what if I have to upload new directories
& folders with files in them?

Is there a recursive feature in ftp?

Bernhard

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Peter Hardy
Sent: Tuesday, 12 March 2002 19:33
To: SLUG user group
Subject: Re: [SLUG] ftp client


On Tue, 2002-03-12 at 18:50, Bernhard Lüder wrote:
> Can I use the native RedHat ftp client to automate this task?
> How do I get it to log in as a user, then transfer files and the log out
> after?

It's fairly easy to use ftp in shell scripts.  I used to use the
following to upload webcam images to the webserver.

uploadpic() {
ftp -v -i -n $host <http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug



[SLUG] ftp client - MORE

2002-03-12 Thread Bernhard Lüder

Ok, that works for known files, but what if I have to upload new directories
& folders with files in them?

Is there a recursive feature in ftp?

Bernhard

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Peter Hardy
Sent: Tuesday, 12 March 2002 19:33
To: SLUG user group
Subject: Re: [SLUG] ftp client


On Tue, 2002-03-12 at 18:50, Bernhard Lüder wrote:
> Can I use the native RedHat ftp client to automate this task?
> How do I get it to log in as a user, then transfer files and the log out
> after?

It's fairly easy to use ftp in shell scripts.  I used to use the
following to upload webcam images to the webserver.

uploadpic() {
ftp -v -i -n $host