RE: Automatiser un transfert FTP.

Page principale

Répondre à ce message
Auteur: Benoit Lion
Date:  
À: 'guilde@imag.fr'
Sujet: RE: Automatiser un transfert FTP.
pour un simple transfert, le ftp d'origine peut s'automatiser tel quel :

1 : créer un fichier .netrc dans ton home directory
le fichier doit contenir :
    machine XXX login YYY password ZZZ


( remplacer XXX YYY ZZZ par les infos de l'hôte distant )

Attention : .netrc doit être en 600 pour des raisons normales de sécurité car le mot de passe y est en clair.

2 : les commandes ftp classiques peuvent être mises dans un fichier :
    binary
    cd truc
    get machin


3 : le lancement peut alors être automatiser :

    echo "ftp XXX < fichier_de_commandes " | at 22:00


J'en profite pour poser une question.
La commande at -l permet de voir les jobs en attente avec seulement un numéro et une date.
Y-a-t-il une commande pour les étourdis qui permette de voir quelle commande a été lancée ?

Benoit Lion
_________________________________
Service Informatique
Inspection Académique de Chambéry
tel : 04 79 62 53 19
fax : 04 79 69 72 99
________________________________


begin 600 WINMAIL.DAT
M>)\^(A8)`0:0" `$```````!``$``0>0!@`(````Y 0```````#H``$(@ <`
M& ```$E032Y-:6-R;W-O9G0@36%I;"Y.;W1E`#$(`0V ! `"`````@`"``$$
MD 8`? $```$````1`````P``, (````+``\.``````(!_P\!````.P``````
M``"!*Q^DOJ,0&9UN`-T!#U0"`````&=U:6QD94!I;6%G+F9R`%--5% `9W5I
M;&1E0&EM86<N9G(``!X``C !````!0```%--5% `````'@`#, $````/````
M9W5I;&1E0&EM86<N9G(```,`%0P!`````P#^#P8````>``$P`0```!$````G
M9W5I;&1E0&EM86<N9G(G``````(!"S !````% ```%--5% Z1U5)3$1%0$E-
M04<N1E(``P``.0`````+`$ Z`0````,`<3H`````'@#V7P$````/````9W5I
M;&1E0&EM86<N9G(```(!]U\!````.P````````"!*Q^DOJ,0&9UN`-T!#U0"
M`````&=U:6QD94!I;6%G+F9R`%--5% `9W5I;&1E0&EM86<N9G(```,`_5\!
M`````P#_7P`````"`?8/`0````0````````"4$8!!( !`"(```!213H@075T
M;VUA=&ES97(@=6X@=')A;G-F97)T($944"X`LPL!!8 #``X```#/!P,`'P`+
M``,`%0`#`!X!`2" `P`.````SP<#`!\`"@`I`!D``P!'`0$)@ $`(0```#4Q
M-C P.3(Y,T-%-T0R,3%!,SA!,# V,# X-S(X,S8V`,4&`0.0!@"D!P``(P``
M``L``@`!````"P`C``$````#`"8```````L`*0```````P`N```````"`3$`
M`0```-<```!00T1&14(P.0`!``(`4 `````````XH;L0!>40&J&[" `K*E;"
M``!M<W!S="YD;&P``````$Y)5$'YO[@!`*H`-]EN````13I<36%I;"!E>&-H
M86YG95QP97)S;RYP<W0`& `````````3Q-,ASU+2$:.*`& (+8:CHH `````
M```8`````````!/$TR'/4M(1HXH`8 @MAJ/"@ ``$ ```%%@"2D\Y](1HXH`
M8 AR@V8B````4D4Z($%U=&]M871I<V5R('5N('1R86YS9F5R="!&5% N```#
M`#8``````$ `.0"@AUA357N^`1X`< `!````(@```%)%.B!!=71O;6%T:7-E
M<B!U;B!T<F%N<V9E<G0@1E10+@````(!<0`!````%@````&^>U53#"D)8%+G
M/!'2HXH`8 AR@V8``!X`'@P!````!0```%--5% `````'@`?# $````;````
M0F5N;VET+DQI;VY 86,M9W)E;F]B;&4N9G(```,`!A"^RE&?`P`'$+T"```>
M``@0`0```&4```!03U5254Y324U03$544D%.4T9%4E0L3$5&5%!$3U))1TE.
M15!%551305543TU!5$E315)414Q1545,.C$Z0U+I15)53D9)0TA)15).1512
M0T1!3E-43TY(3TU%1$E214-43U)9``````(!"1 !````@ ,``'P#``"'!0``
M3%I&=<9]C<W3``H!"S X`?<@`J0#XPD"`&-H"L!S970P/B '$P*#`% "\@_Y
M5&$6: -Q`H,R#X=P<G&:,A"6?0J ",@@.PEOF#(U-0* "H%U8P!0#0L#8P!!
M"V!N9S$P)#,V"Z8@< AA('4+`Z `D&T+4&4@='+%`'%F!)!T+" 9@0& D' @
M9"<%L&EG"X 1&9!P974%0',G8;L;D -Q= 0`!) 9H&4#('9Q"E #(#H*H@J$
M"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
M!@``````P ```````$8`````$(4````````#`"F "" &``````# ````````
M1@````!2A0``=! ``!X`28 (( 8``````, ```````!&`````%2%```!````
M!0```#@N,#(``````P!*@ @@!@``````P ```````$8``````84````````+
M`%. "" &``````# ````````1@`````.A0````````,`5( (( 8``````, `
M``````!&`````!&%`````````P!6@ @@!@``````P ```````$8`````&(4`
M```````>`&6 "" &``````# ````````1@`````VA0```0````$`````````
M'@!F@ @@!@``````P ```````$8`````-X4```$````!`````````!X`9X (
M( 8``````, ```````!&`````#B%```!`````0`````````>`#T``0````4`
4``!213H@``````,`#33]-P``2LB%
`
end