FTP commands
Hi folks.
I'm trying to use a single line to delete a file on a remote ftp
server. I am in the OS X bash shell, and I am trying to integrate a
gateway to the bash shell. I am using ftp commands, and this is the
current syntax I am using, which reports that it is working, but it
isn't deleting the file.
ftp -p -d ftp://username:password [at] ftp.domain.com/subdirectory/ delete
filename.jpg
It goes to the proper subdirectory, but the delete isn't happening,
nor being asked to be done. I've turned on debugging and passive
mode.
Any ideas? Cheers.
Re: FTP commands
On Nov 23, 6:20 pm, BeeRich <beer... [at] gmail.com> wrote:
> Hi folks.
>
> I'm trying to use a single line to delete a file on a remote ftp
> server. I am in the OS X bash shell, and I am trying to integrate a
> gateway to the bash shell. I am using ftp commands, and this is the
> current syntax I am using, which reports that it is working, but it
> isn't deleting the file.
>
> ftp -p -d ftp://username:passw... [at] ftp.domain.com/subdirectory/ delete
ftp ftp.domain.com <<eof
user <user>
password <passwd>
cd /subdirectory
delete <file>
quit
eof
Done.
> filename.jpg
>
> It goes to the proper subdirectory, but the delete isn't happening,
> nor being asked to be done. I've turned on debugging and passive
> mode.
>
> Any ideas? Cheers.
Re: FTP commands
On Nov 23, 7:02 pm, "--==[ bman ]==--" <bmyn... [at] gmail.com> wrote:
> On Nov 23, 6:20 pm, BeeRich <beer... [at] gmail.com> wrote:> Hi folks.
>
> > I'm trying to use a single line to delete a file on a remote ftp
> > server. I am in the OS X bash shell, and I am trying to integrate a
> > gateway to the bash shell. I am using ftp commands, and this is the
> > current syntax I am using, which reports that it is working, but it
> > isn't deleting the file.
>
> > ftp -p -d ftp://username:passw... [at] ftp.domain.com/subdirectory/ delete
>
> ftp ftp.domain.com <<eof
> user <user>
> password <passwd>
> cd /subdirectory
> delete <file>
> quit
> eof
>
> Done.
Hi there. Needed a one line solution, and I found one using an echo
command.
Cheers
Re: FTP commands
On Fri, 23 Nov 2007 15:20:34 -0800, BeeRich wrote:
> Hi folks.
>
> I'm trying to use a single line to delete a file on a remote ftp server.
> I am in the OS X bash shell, and I am trying to integrate a gateway to
> the bash shell. I am using ftp commands, and this is the current syntax
> I am using, which reports that it is working, but it isn't deleting the
> file.
>
> ftp -p -d ftp://username:password [at] ftp.domain.com/subdirectory/ delete
> filename.jpg
>
> It goes to the proper subdirectory, but the delete isn't happening, nor
> being asked to be done. I've turned on debugging and passive mode.
>
> Any ideas? Cheers.
Try
ftp -p -d -n ftp.domain.com <<'!'
user username password
cd subdirectory
delete filename.jpg
!
(thats 5 lines) and see if that works. This is being done from general
ftp experience, I don't have an OS X machine to try it on, so if someone
else offers you a suggestion then try theirs first.
Re: FTP commands
On Nov 24, 8:38 am, BeeRich <beer... [at] gmail.com> wrote:
> On Nov 23, 7:02 pm, "--==[ bman ]==--" <bmyn... [at] gmail.com> wrote:
>
>
>
> > On Nov 23, 6:20 pm, BeeRich <beer... [at] gmail.com> wrote:> Hi folks.
>
> > > I'm trying to use a single line to delete a file on a remote ftp
> > > server. I am in the OS X bash shell, and I am trying to integrate a
> > > gateway to the bash shell. I am using ftp commands, and this is the
> > > current syntax I am using, which reports that it is working, but it
> > > isn't deleting the file.
>
> > > ftp -p -d ftp://username:passw... [at] ftp.domain.com/subdirectory/ delete
>
> > ftp ftp.domain.com <<eof
> > user <user>
> > password <passwd>
> > cd /subdirectory
> > delete <file>
> > quit
> > eof
>
> > Done.
>
> Hi there. Needed a one line solution, and I found one using an echo
> command.
>
> Cheers
how echo work? could u pls paste the code?
for this kind of job, I'm too spoiled by expect:)