Re: Datei von Server zu Server kopieren
Philipp Kern <[email protected]> Sat, 28 Aug 2004 14:27:44 +0200
| Newsgroups | gmane.comp.lang.ruby.german |
|---|---|
| Organization | 0x539.de |
| Message-ID | <[email protected]> |
--===============0729188299==
Content-Type: multipart/signed; micalg=pgp-sha1;
protocol="application/pgp-signature";
boundary="=-X0hRhh5SJes1/zYgHvPR"
--=-X0hRhh5SJes1/zYgHvPR
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Sa, 2004-08-28 at 14:01, Dirk Einecke wrote:
> Beim Ansgangsserver habe ich leider keinen SSH-Zugang - kann also nichts=20
> =FCber die Konsole machen. Somit geht das schon mal nicht. Oder kann man=20
> sowasn auch =FCber Ruby aufrufen?
--------------------------------------------------------- Kernel::system
system( aCmd [, args]* ) -> true or false
------------------------------------------------------------------------
Executes aCmd in a subshell, returning true if the command was
found and ran successfully, false otherwise. An error status is
available in $?. The arguments are processed in the same way as for
Kernel::exec on page ??.
system("echo *")
system("echo", "*")
produces:
config.h main.rb
*
> > Ansonsten, komprimierst du den Dump auch?
> Nein. Wie kann man denn sowas mit Ruby machen?
Entweder bzip2 =FCber System benutzen oder...
require 'zlib'
Zlib::Deflate.deflate(str)
Aber dann brauchst du das Ding evt. als String im Speicher und das w=E4re
nicht umbedingt praktisch. ;o)
Nett fand ich auch:
> str =3D ""; 10000.times { str << "long" }
> str.length
=3D> 40000
> Zlib::Deflate.deflate(str).length
=3D> 67
DB-Dumps solltest du aber gut komprimieren k=F6nnen. ;o)
Gr=FC=DFe,
Philipp Kern
--=-X0hRhh5SJes1/zYgHvPR
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQBBMHo+7Ro5M7LPzdgRAvKLAKCIRY8Op3FVqu6YInY6FPkHGMMsHwCbBVpj
8ooJjqYNrWhkXzG//PZluy4=
=kOUq
-----END PGP SIGNATURE-----
--=-X0hRhh5SJes1/zYgHvPR--
--===============0729188299==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Ruby-de-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ruby-de-talk
--===============0729188299==--