Thread View: es.comp.os.linux.programacion
18 messages
18 total messages
Started by XimoNW
Tue, 30 Aug 2005 10:21
scipt ftp
Author: XimoNW
Date: Tue, 30 Aug 2005 10:21
Date: Tue, 30 Aug 2005 10:21
7 lines
956 bytes
956 bytes
Hola a todos Quiero automatizar una transferencia por ftp y me preguntava si podia realizar un script que me conectara al servidor ftp, se situara en la ruta adecuada, tomara el archivo del equipo y se desconectara. Es posible?, gracias.
Re: scipt ftp
Author: Oscar Garcia
Date: Tue, 30 Aug 2005 11:27
Date: Tue, 30 Aug 2005 11:27
15 lines
1463 bytes
1463 bytes
El Tue, 30 Aug 2005 12:21:04 +0200, XimoNW <elrei69@yahoo.es> escribi�: >Quiero automatizar una transferencia por ftp y me preguntava si podia >realizar un script que me conectara al servidor ftp, se situara en la >ruta adecuada, tomara el archivo del equipo y se desconectara. Es posible?, Siempre puedes usar wget: http://www.cbi.pku.edu.cn/Doc/CS/wget/index.es.html Un saludo. -- �scar Javier Garc�a Baudet LinaresDigital http://redstar.linaresdigital.com/
Re: scipt ftp
Author: Iván Sánchez Ortega
Date: Tue, 30 Aug 2005 13:09
Date: Tue, 30 Aug 2005 13:09
45 lines
2481 bytes
2481 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 XimoNW dixit: > Quiero automatizar una transferencia por ftp y me preguntava si podia > realizar un script que me conectara al servidor ftp, se situara en la > ruta adecuada, tomara el archivo del equipo y se desconectara. Es > posible?, �Un script para hacer algo *tan* sencillo? Amos hombreeee.... Si tienes KDE instalado: kfmclient copy ftp://usuario:password@servidor.ftp.org/directorio/fichero1 ftp://usuario:password@servidor.ftp.org/directorio/fichero2 file://home/ivan/downloads (v�ase http://developer.kde.org/documentation/other/kfmclient.html; ojo, que esto vale para cualquier otro KIOslave) O, si tienes wget instalado: cd /home/ivan/downloads ; wget ftp://usuario:password@servidor.ftp.org/directorio/fichero1 ftp://usuario:password@servidor.ftp.org/directorio/fichero2 (los comandos en una sola l�nea, claro) - -- - ---------------------------------- Iv�n S�nchez Ortega -ivansanchez-arroba-escomposlinux-punto-org http://acm.asoc.fi.upm.es/~mr/ MSN:i_eat_s_p_a_m_for_breakfast@hotmail.com ICQ:72800842 Jabber:ivansanchez@jabber.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDFFqPR56dWuhgxGgRApQ3AJsHWUBvOemG/X5y+Zcz07KKI6WlDgCeIVWO jc4wdKn6orFEOAIZ4y5IYPA= =10gJ -----END PGP SIGNATURE-----
Re: scipt ftp
Author: gamo
Date: Tue, 30 Aug 2005 14:32
Date: Tue, 30 Aug 2005 14:32
40 lines
1994 bytes
1994 bytes
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-8622099-1125412358=:27280 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 30 Aug 2005, XimoNW wrote: > Hola a todos > > Quiero automatizar una transferencia por ftp y me preguntava si podia=20 > realizar un script que me conectara al servidor ftp, se situara en la rut= a=20 > adecuada, tomara el archivo del equipo y se desconectara. Es posible?, > > gracias. > Antiguamente se hacia as=ED, con un nohup ftp < ftp.in donde ftp.in era del tipo open server.com user anonymous password bin cd /pub/loquesea mget * bye [algo as=ED] Pero hoy d=EDa no merece la pena: puedes usar wget o el mc Saludos, --=20 http://www.telecable.es/personales/gamo/ GED/GB d+ s+:+ a C++ U+++ P+++ L++ E---- W++ N++ o K+ w O+ M- V PS++ PE++ Y PGP+ t 5-- X+ R-- tv-- b++ DI++ D+ G- e+++ h+ r-- z perl -e 'print 111_111_111**2,"\n";' --8323328-8622099-1125412358=:27280--
Enteros de 64 bits en Perl (era: Re: scipt ftp)
Author: David Serrano (Hue-Bond)
Date: Tue, 30 Aug 2005 16:58
Date: Tue, 30 Aug 2005 16:58
33 lines
1978 bytes
1978 bytes
gamo, mar20050830@16:32:38(CEST):
>
> perl -e 'print 111_111_111**2,"\n";'
$ perl -e 'print 111_111_111**2,"\n";'
1.23456789876543e+16
"Hmm, ¿y sin notación científica?"
$ perl -e 'printf "%u\n", 111_111_111**2'
4294967295
$ perl -e 'printf "%llu\n", 111_111_111**2'
4294967295
Probé Math::BigInt y el resultado es el mismo. Lo más que me he conseguido
aproximar es:
$ perl -e 'printf "%.17g\n", 111_111_111**2'
12345678987654320
$ perl -e 'printf "%.f\n", 111_111_111**2'
12345678987654320
Pero entonces tenemos los fallos inherentes a la coma flotante. Mi versión
de Perl es 5.8.7 en un x86.
$ perl -V|grep 64bit
use64bitint=undef use64bitall=undef uselongdouble=undef
Con este hardware y esta versión no puedo hacer nada, verdad?
--
David Serrano
Re: Enteros de 64 bits en Perl (era: Re: scipt ftp)
Author: gamo
Date: Tue, 30 Aug 2005 19:14
Date: Tue, 30 Aug 2005 19:14
28 lines
2010 bytes
2010 bytes
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--8323328-977921920-1125429283=:29129
Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE
On Tue, 30 Aug 2005, David Serrano (Hue-Bond) wrote:
> Pero entonces tenemos los fallos inherentes a la coma flotante. Mi versi=
=F3n
> de Perl es 5.8.7 en un x86.
>
> $ perl -V|grep 64bit
> use64bitint=3Dundef use64bitall=3Dundef uselongdouble=3Dundef
ON OFF ON=20
>
> Con este hardware y esta versi=F3n no puedo hacer nada, verdad?
>
S=ED puedes. Compila el fuente de perl con 64int y ld,
te saldr=E1 12345678987654321=20
Saludos,
>
> --=20
> David Serrano
>
--8323328-977921920-1125429283=:29129--
Re: scipt ftp
Author: XimoNW
Date: Wed, 31 Aug 2005 09:23
Date: Wed, 31 Aug 2005 09:23
16 lines
1349 bytes
1349 bytes
Oscar Garcia escribi�: > El Tue, 30 Aug 2005 12:21:04 +0200, XimoNW <elrei69@yahoo.es> > escribi�: > >>Quiero automatizar una transferencia por ftp y me preguntava si podia >>realizar un script que me conectara al servidor ftp, se situara en la >>ruta adecuada, tomara el archivo del equipo y se desconectara. Es posible?, > > > Siempre puedes usar wget: > http://www.cbi.pku.edu.cn/Doc/CS/wget/index.es.html > > Un saludo. > Pero lo que quiero es subir ficheros y wget no me sirve, no?
Re: scipt ftp
Author: iarenaza
Date: Wed, 31 Aug 2005 10:04
Date: Wed, 31 Aug 2005 10:04
24 lines
1897 bytes
1897 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "XimoNW" == XimoNW <elrei69@yahoo.es> writes:
XimoNW> Pero lo que quiero es subir ficheros y wget no me sirve,
XimoNW> no?
No. En ese caso puedes usar el script que te indica gamo, cambiando el
mget por un put (o mput), y ajustanto las rutas, etc.
Saludos. I�aki.
- --
Get PGP/GPG Keys at http://www.escomposlinux.org/iarenaza/pgpkey.php
I use free software / Yo uso software libre
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFDFYC2ZXLnGT1HLgcRAjIgAJ4mQaSHGkdYlH7mHbXOKdUtmQ8PUwCcDjw0
5/+whiidtRADFDr9qJzZrvE=
=zF88
-----END PGP SIGNATURE-----
Re: scipt ftp
Author: XimoNW
Date: Wed, 31 Aug 2005 10:29
Date: Wed, 31 Aug 2005 10:29
32 lines
1619 bytes
1619 bytes
gamo escribi�: > On Tue, 30 Aug 2005, XimoNW wrote: > >> Hola a todos >> >> Quiero automatizar una transferencia por ftp y me preguntava si podia >> realizar un script que me conectara al servidor ftp, se situara en la >> ruta adecuada, tomara el archivo del equipo y se desconectara. Es >> posible?, >> >> gracias. >> > > Antiguamente se hacia as�, con un nohup ftp < ftp.in > donde ftp.in era del tipo > > open server.com > user anonymous password > bin > cd /pub/loquesea > mget * > bye > > [algo as�] > > Pero hoy d�a no merece la pena: puedes usar wget o el mc > Saludos, > Este script, el ftp.ini, es as� exactamente?, es que no me conecta y el servidor ftp me dice que el usuario que intenta conectar es "user usuario pasword"
Re: scipt ftp
Author: Luis Angel Fdez. Fdez.
Date: Wed, 31 Aug 2005 10:36
Date: Wed, 31 Aug 2005 10:36
29 lines
1860 bytes
1860 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 A las 09:23 del mi�rcoles 31 de agosto, XimoNW <elrei69@yahoo.es> hablando de Re: scipt ftp en es.comp.os.linux.programacion dijo... Hola > Pero lo que quiero es subir ficheros y wget no me sirve, no? Entonces quiz�s te sirva ncftpput. Viene con el ncftp. Ta llueu. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDFYfl36vTd3lGvCgRAtIbAJ9NgvWp5A2472Jtl/aye7DvOWrSVwCeM02z Qn6wbnKQJMrJGrmokPfzAsc= =S9nd -----END PGP SIGNATURE----- -- Debian 3.1 Kernel 2.6.8-11-amd64-generic x86_64 (GCC) 3.3.5 AMD Athlon(tm) 64 Processor 3200+ ( 2200.125MHz ) Linux User #99754 Jabber: koxo@jabber.org Hattrick: C.D. Arrancatapinos (488047) VI.759
Re: scipt ftp
Author: XimoNW
Date: Wed, 31 Aug 2005 10:41
Date: Wed, 31 Aug 2005 10:41
63 lines
2769 bytes
2769 bytes
gamo escribi�:
> On Tue, 30 Aug 2005, XimoNW wrote:
>
>> Hola a todos
>>
>> Quiero automatizar una transferencia por ftp y me preguntava si podia
>> realizar un script que me conectara al servidor ftp, se situara en la
>> ruta adecuada, tomara el archivo del equipo y se desconectara. Es
>> posible?,
>>
>> gracias.
>>
>
> Antiguamente se hacia as�, con un nohup ftp < ftp.in
> donde ftp.in era del tipo
>
> open server.com
> user anonymous password
> bin
> cd /pub/loquesea
> mget *
> bye
>
> [algo as�]
>
> Pero hoy d�a no merece la pena: puedes usar wget o el mc
> Saludos,
>
Mi script para probar es:
open 192.168.1.31
user usuario pasword
bye
Y la salida que obtengo del nohup.put es:
'AUTH': command not understood.
'AUTH': command not understood.
KERBEROS_V4 rejected as an authentication type
Password:Name (192.168.1.31:root): 'AUTH': command not understood.
'AUTH': command not understood.
KERBEROS_V4 rejected as an authentication type
Password:Name (192.168.1.31:root): 'AUTH': command not understood.
'AUTH': command not understood.
KERBEROS_V4 rejected as an authentication type
Password:Name(192.168.1.31:root):ftp:192.168.1.31:xnw:unknown host
?Invalid command
Not connected.
Not connected.
Not connected.
'AUTH': command not understood.
'AUTH': command not understood.
KERBEROS_V4 rejected as an authentication type
Password:Name(192.168.1.31:root): Please login with USER and PASS.
Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Password:Name(anubis.uji.es:root): 'AUTH': command not understood.
'AUTH': command not understood.
KERBEROS_V4 rejected as an authentication type
por si os sirve para que me ayudeis en algo...
Re: scipt ftp
Author: iarenaza
Date: Wed, 31 Aug 2005 11:12
Date: Wed, 31 Aug 2005 11:12
46 lines
2520 bytes
2520 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "XimoNW" == XimoNW <elrei69@yahoo.es> writes:
XimoNW> Mi script para probar es:
XimoNW> open 192.168.1.31 user usuario pasword bye
A la hora de lanzar el ftp, hay que indicar la opcin '-n' para que no
intente hacer el autologin y nos devuelva el prompt para que lea la
orden 'user ...'. De lo contrario no funciona. Algo como:
$ ftp -n
ftp> open ftp.escomposlinux.org
Connected to mainake.escomposlinux.org.
220 rantanplan.linux.es FTP server ready.
ftp> user anonymous password
331 Anonymous login ok, send your complete email address as your password.
230-
... (un monton de texto borrado)
230 Anonymous access granted, restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bye
221 Goodbye.
Asi que para lanzar el script, deberias hacer algo como:
nohup ftp -n < ftp.ini
(si lo quieres lanzar con nohup, que esa es otra cuestion).
Saludos. I�aki.
- --
Get PGP/GPG Keys at http://www.escomposlinux.org/iarenaza/pgpkey.php
I use free software / Yo uso software libre
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFDFZCLZXLnGT1HLgcRAh80AKCArYAKQsxePdlUZA1tQUzc7J+pigCfVeXT
S1crgDsKftBqdMR/TGSkwno=
=kqVR
-----END PGP SIGNATURE-----
Re: scipt ftp
Author: XimoNW
Date: Wed, 31 Aug 2005 11:31
Date: Wed, 31 Aug 2005 11:31
12 lines
1115 bytes
1115 bytes
> Asi que para lanzar el script, deberias hacer algo como: > > nohup ftp -n < ftp.ini Que grande!!, gracias, a transferir se ha dicho!!! > Saludos. I�aki. Un abrazo
Re: scipt ftp
Author: Iván Sánchez Ortega
Date: Fri, 02 Sep 2005 01:23
Date: Fri, 02 Sep 2005 01:23
32 lines
2136 bytes
2136 bytes
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 XimoNW dixit: > Pero lo que quiero es subir ficheros y wget no me sirve, no? Si quieres bajar algo: kfmclient copy ftp://usuario:password@servidor.ftp.org/directorio/fichero1 file://home/ivan/downloads Y si quieres subir algo: kfmclient copy file://home/ivan/loquesea.tgz ftp://usuario:password@servidor.ftp.org/directorio/ - -- - ---------------------------------- Iv�n S�nchez Ortega -ivansanchez-arroba-escomposlinux-punto-org Abraham Lincoln didn't die in vain. He died in Washington, D.C. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDF6mGR56dWuhgxGgRAlmWAKCcm/J31bTgascrBNP0/q8On1jdDwCgtaGP VQyVxtdKW/K9KRVvRpOFuVk= =/WPs -----END PGP SIGNATURE-----
Re: Enteros de 64 bits en Perl (era: Re: scipt ftp)
Author: David Serrano (Hue-Bond)
Date: Fri, 02 Sep 2005 19:02
Date: Fri, 02 Sep 2005 19:02
16 lines
1629 bytes
1629 bytes
David Serrano (Hue-Bond), mar20050830@18:58:09(CEST): > > Probé Math::BigInt y el resultado es el mismo. Lo hice mal. $ perl use Math::BigInt; print Math::BigInt->new (111_111_111**2), "\n"; ^D 12345678987654300 printf "%.17g" aún lo hace mejor. -- David Serrano
Re: Enteros de 64 bits en Perl (era: Re: scipt ftp)
Author: gamo
Date: Sat, 03 Sep 2005 11:17
Date: Sat, 03 Sep 2005 11:17
36 lines
2017 bytes
2017 bytes
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--8323328-590585737-1125746274=:24897
Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE
On Fri, 2 Sep 2005, David Serrano (Hue-Bond) wrote:
> David Serrano (Hue-Bond), mar20050830@18:58:09(CEST):
>>
>> Prob=E9 Math::BigInt y el resultado es el mismo.
>
> Lo hice mal.
>
> $ perl
> use Math::BigInt; print Math::BigInt->new (111_111_111**2), "\n";
> ^D
> 12345678987654300
No, prueba con
$x->bpow($y); # power of arguments (x ** y)
o m=E1s sencillo: use bignum;
>
> printf "%.17g" a=FAn lo hace mejor.
>
>
> --=20
> David Serrano
>
Prueba a compilarlo. Merece la pena.
Saludos,
--8323328-590585737-1125746274=:24897--
Re: scipt ftp
Author: XimoNW
Date: Fri, 09 Sep 2005 08:39
Date: Fri, 09 Sep 2005 08:39
56 lines
2735 bytes
2735 bytes
(I�aki Arenaza) escribi�: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > >>>>>>"XimoNW" == XimoNW <elrei69@yahoo.es> writes: > > > XimoNW> Mi script para probar es: > > XimoNW> open 192.168.1.31 user usuario pasword bye > > A la hora de lanzar el ftp, hay que indicar la opcin '-n' para que no > intente hacer el autologin y nos devuelva el prompt para que lea la > orden 'user ...'. De lo contrario no funciona. Algo como: > > $ ftp -n > ftp> open ftp.escomposlinux.org > Connected to mainake.escomposlinux.org. > 220 rantanplan.linux.es FTP server ready. > ftp> user anonymous password > 331 Anonymous login ok, send your complete email address as your password. > 230- > ... (un monton de texto borrado) > 230 Anonymous access granted, restrictions apply. > Remote system type is UNIX. > Using binary mode to transfer files. > ftp> bye > 221 Goodbye. > > Asi que para lanzar el script, deberias hacer algo como: > > nohup ftp -n < ftp.ini > > (si lo quieres lanzar con nohup, que esa es otra cuestion). > > Saludos. I�aki. Y sabes que opci�n debo poner para que me escriba la salida estandar en un fichero, pq si dentro del scipt ftp le digo por ejemplo ls>doc, me crea doc pero no escribe la salida de ls. Supongo que es cuesti�n de ponerle la opci�n correcta, pero leyebdo el man no lo tengo claro... > > - -- > Get PGP/GPG Keys at http://www.escomposlinux.org/iarenaza/pgpkey.php > I use free software / Yo uso software libre > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (GNU/Linux) > Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/> > > iD8DBQFDFZCLZXLnGT1HLgcRAh80AKCArYAKQsxePdlUZA1tQUzc7J+pigCfVeXT > S1crgDsKftBqdMR/TGSkwno= > =kqVR > -----END PGP SIGNATURE-----
Re: scipt ftp
Author: iarenaza
Date: Sun, 11 Sep 2005 20:48
Date: Sun, 11 Sep 2005 20:48
25 lines
2051 bytes
2051 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "XimoNW" == XimoNW <elrei69@yahoo.es> writes:
XimoNW> Y sabes que opci�n debo poner para que me escriba la
XimoNW> salida estandar en un fichero, pq si dentro del scipt ftp
Hasta donde yo se, esto deberia funcionar:
ftp -n < ftp.ini > salida.estandar
Saludos. I�aki.
- --
Get PGP/GPG Keys at http://www.escomposlinux.org/iarenaza/pgpkey.php
I use free software / Yo uso software libre
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFDJJgbZXLnGT1HLgcRAt+KAJ0XNsXsWWNeJX3j5RAupKZD1T5HmACfboxp
6YTwSV86B6z1VmQPXy4TLyg=
=f643
-----END PGP SIGNATURE-----
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads