<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8398869792658371506</id><updated>2024-09-16T17:54:08.054-07:00</updated><title type='text'>Jeanpul</title><subtitle type='html'>Pense-bête des commandes que j&#39;utilise parfois...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-1469038970908071722</id><published>2013-11-07T02:18:00.001-08:00</published><updated>2013-11-07T02:21:17.826-08:00</updated><title type='text'>Mirroir d&#39;un site via ftp</title><content type='html'>En utilisant &lt;i&gt;lftp&lt;/i&gt; (pour certains hébergeurs ne pas oublier de désactiver la vérification de certificat : &lt;i&gt;set ssl:verify-certificate no&lt;/i&gt;)
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;lftp ftp.toto.org
user XXX
passwd YYY
cd &amp;lt;rep site hébergé&amp;gt;
lcd &amp;lt;rep site local&amp;gt;
mirror --reverse --verbose --exclude-glob .svn/ --exclude-glob *~
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/1469038970908071722/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2013/11/mirroir-dun-site-via-ftp.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/1469038970908071722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/1469038970908071722'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2013/11/mirroir-dun-site-via-ftp.html' title='Mirroir d&#39;un site via ftp'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-7283126157703983865</id><published>2011-09-08T05:58:00.000-07:00</published><updated>2011-09-08T05:58:06.649-07:00</updated><title type='text'>Extraire quelques fichiers d&#39;une archive tar gz</title><content type='html'>La commande suivante permet d&#39;extraite un ensemble de fichiers d&#39;une archive à partir d&#39;une expression régulière puis effectue un changement de nom du fichier en sortie pour éviter
de se retrouver avec l&#39;arborescence des répertoires.

&lt;pre class=&quot;brush:bash&quot;&gt;tar --show-transformed --transform=&quot;s,/,_,g;s/BackupSettings_BQBHServer_//&quot; -zxf archive_file.tgz --wildcards &#39;*server*sensor*config*ignore*ppm&#39;
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/7283126157703983865/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/09/extraire-quelques-fichiers-dune-archive.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/7283126157703983865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/7283126157703983865'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/09/extraire-quelques-fichiers-dune-archive.html' title='Extraire quelques fichiers d&#39;une archive tar gz'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-726727945308164307</id><published>2011-09-08T05:50:00.000-07:00</published><updated>2011-09-08T05:52:07.602-07:00</updated><title type='text'>Changer la taille d&#39;une table sous Latex</title><content type='html'>Lorsque le nombre de colonnes devient trop important, la table se retrouve alors trop large et déborde de la page. Pour éviter ceci, la solution consiste à utiliser la commande resizebox du package graphics.
&lt;pre class=&quot;brush:bash&quot;&gt;
\resizebox{\textwidth}{!}{\begin{tabular}{|rrrrrrrrrrr|}
  \hline
 &amp; (-20,-10] &amp; (-10,-5] &amp; (-5,-3] &amp; (-3,-2] &amp; (-2,0] &amp; (0,2] &amp; (2,3] &amp; (3,5] &amp; (5,10] &amp; (10,20] \\ 
  \hline
[0,2] &amp;   0 &amp;   0 &amp;   0 &amp;   0 &amp;  46 &amp;   3 &amp;   1 &amp;   0 &amp;   0 &amp;   0 \\ 
\end{tabular}}
&lt;/pre&gt;

</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/726727945308164307/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/09/changer-la-taille-dune-table-sous-latex.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/726727945308164307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/726727945308164307'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/09/changer-la-taille-dune-table-sous-latex.html' title='Changer la taille d&#39;une table sous Latex'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-1990810065217283851</id><published>2011-08-24T08:13:00.000-07:00</published><updated>2011-08-24T08:15:15.052-07:00</updated><title type='text'>Créer des requêtes SQL Update en utilisant la commande sed</title><content type='html'>On utilise la commande sed pour créer un update SQL sur chaque ligne d&#39;un fichier contenant 2 colonnes. La 1ere colonne contient un identifiant alphanum et la deuxième un identifiant commençant par Name_. Les 2 colonnes sont séparées uniquement par 1 seul espace.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;sed &#39;s/\(^.*\)\ \(Name_.*\)/update Table set Name=&quot;\2&quot; where Id=&quot;\1&quot;;/&#39; Cols.txt
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/1990810065217283851/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/08/creer-des-requetes-sql-update-en.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/1990810065217283851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/1990810065217283851'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/08/creer-des-requetes-sql-update-en.html' title='Créer des requêtes SQL Update en utilisant la commande sed'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-4721586911468104540</id><published>2011-06-30T02:44:00.000-07:00</published><updated>2011-06-30T04:56:25.376-07:00</updated><title type='text'>Assembler un ensemble d&#39;images dans une grille</title><content type='html'>En utilisant la commande&amp;nbsp;&lt;a href=&quot;http://www.imagemagick.org/script/montage.php&quot;&gt;montage&lt;/a&gt;,&amp;nbsp;assembler 8 images sous la forme img_ID_[0-7].jpg dans une grille de 3 colonnes par 4 lignes. ID est l&#39;identifiant unique de l&#39;ensemble. Les images seront disposées comme suit:&lt;br /&gt;
&lt;table border=&quot;1&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td&gt;vide&lt;/td&gt;&lt;td&gt;vide&lt;/td&gt;&lt;td&gt;img_ID_4.jpg&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;vide&lt;/td&gt;&lt;td&gt;img_ID_5.jpg&lt;/td&gt;&lt;td&gt;img_ID_2.jpg&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;img_ID_3.jpg&lt;/td&gt;&lt;td&gt;img_ID_6.jpg&lt;/td&gt;&lt;td&gt;img_ID_0.jpg&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;vide&lt;/td&gt;&lt;td&gt;img_ID_1.jpg&lt;/td&gt;&lt;td&gt;img_ID_7.jpg&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;montage -tile 3x4 -geometry &#39;1x1&amp;lt;+1+1&#39; null: null: img_ID_4.jpg null: img_ID_{5,2}.jpg img_ID_{3,6,0}.jpg null: img_ID_{1,7}.jpg grid_ID.jpg
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/4721586911468104540/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/06/composition-dun-ensemble-dimages-dans.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/4721586911468104540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/4721586911468104540'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/06/composition-dun-ensemble-dimages-dans.html' title='Assembler un ensemble d&#39;images dans une grille'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-2322907938834066849</id><published>2011-06-03T01:54:00.000-07:00</published><updated>2011-06-07T01:46:23.367-07:00</updated><title type='text'>Modifier une date en SQLITE3</title><content type='html'>Enlève 1 minute sur une colonne de type TIMESTAMP.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:sql&quot;&gt;update table set date=strfimte(&quot;%Y-%m-%d %H:%M:%S&quot;, date, &quot;-1 minutes&quot;);
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/2322907938834066849/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/06/modifier-une-date-en-sqlite3.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/2322907938834066849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/2322907938834066849'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/06/modifier-une-date-en-sqlite3.html' title='Modifier une date en SQLITE3'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-6644718021760735939</id><published>2011-05-24T06:30:00.000-07:00</published><updated>2011-06-30T02:44:03.486-07:00</updated><title type='text'>Forcer la synchronisation du temps avec ntpdate</title><content type='html'>Tout d&#39;abord être sur que le service ntp ne tourne plus :&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;service ntp stop
&lt;/pre&gt;&lt;br /&gt;
Puis forcer la synchronisation avec la commande ntpdate :&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;ntpdate -b &amp;lt;server ntp&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Relancer le service ntp&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;service ntp start
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/6644718021760735939/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/05/forcer-la-synchronisation-du-temps-avec.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/6644718021760735939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/6644718021760735939'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/05/forcer-la-synchronisation-du-temps-avec.html' title='Forcer la synchronisation du temps avec ntpdate'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-7479149490425968352</id><published>2011-04-08T07:59:00.000-07:00</published><updated>2011-04-08T08:00:48.460-07:00</updated><title type='text'>Documentations en libre service</title><content type='html'>Sur le site&amp;nbsp;&lt;a href=&quot;http://en.flossmanuals.net/&quot;&gt;flossmanuals.net&lt;/a&gt;&amp;nbsp;on trouve des documentations en ligne également au format PDF pour certaines.</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/7479149490425968352/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/04/documentations-en-libre-service.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/7479149490425968352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/7479149490425968352'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/04/documentations-en-libre-service.html' title='Documentations en libre service'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-7021296883403567220</id><published>2011-03-25T06:25:00.000-07:00</published><updated>2011-06-07T01:53:16.965-07:00</updated><title type='text'>Générer un fichier de traduction po</title><content type='html'>&lt;p&gt;Je commence par &quot;parser&quot; les fichiers sources pour obtenir une version &quot;template&quot; du fichier de traduction. Pour cela, j&#39;utilise la commande &lt;a href=&quot;http://www.gnu.org/s/hello/manual/gettext/xgettext-Invocation.html&quot;&gt;xgettext&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;find . -name &quot;*.php&quot; | xgettext --from-code=utf-8 --language=PHP 
          -o TransData.pot -f -
&lt;/pre&gt;&lt;p&gt;Ensuite, je copie TransData.pot en TransData_es.po par exemple et effectue la traduction. Enfin, je termine par la génération du fichier mo&lt;br /&gt;
&lt;/p&gt;&lt;pre class=&quot;brush:bash&quot;&gt;msgfmt -o TransData.mo TransData_es.po 
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/7021296883403567220/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/03/generer-un-fichier-de-traduction-po-on.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/7021296883403567220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/7021296883403567220'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/03/generer-un-fichier-de-traduction-po-on.html' title='Générer un fichier de traduction po'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-519450215494578432</id><published>2011-03-15T01:49:00.000-07:00</published><updated>2011-06-07T08:28:58.441-07:00</updated><title type='text'>Trucs et astuces...</title><content type='html'>Utilisation de rsync à travers ssh&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;rsync -avz -e ssh --exclude &quot;*~&quot; --exclude &quot;.svn&quot; login@hostname:/dirsource dirdest
&lt;/pre&gt;&lt;br /&gt;
Forcer ntp à se synchroniser&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;service ntp stop ; ntpd -q -g -x ; service ntp start
&lt;/pre&gt;&lt;br /&gt;
La boucle for type C en Bash&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;for((i=0; i &amp;lt; 16; i++)); do
echo $i 
done
&lt;/pre&gt;&lt;br /&gt;
Remplacement type sed &quot;simple&quot; en Bash&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;dst=${string/exp/rep}
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/519450215494578432/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/03/trucs-et-astuces.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/519450215494578432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/519450215494578432'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/03/trucs-et-astuces.html' title='Trucs et astuces...'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-9217481372188706721</id><published>2011-01-11T07:22:00.000-08:00</published><updated>2011-01-11T07:22:21.436-08:00</updated><title type='text'>Live coding</title><content type='html'>Sur ce &lt;a href=&quot;http://www.toplap.org/&quot;&gt;site&lt;/a&gt; on trouve pas mal d&#39;informations sur le &quot;live coding&quot;</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/9217481372188706721/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/01/live-coding.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/9217481372188706721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/9217481372188706721'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/01/live-coding.html' title='Live coding'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-9103449066537298543</id><published>2011-01-04T00:48:00.000-08:00</published><updated>2011-01-04T00:48:45.417-08:00</updated><title type='text'>A lire...</title><content type='html'>Voici un &lt;a href=&quot;http://kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.2011.01.02a.pdf&quot;&gt;livre&lt;/a&gt;&amp;nbsp;très intéressant sur la programmation parallèle. J&#39;ai découvert le lien sur un post du 3 janvier 2011 sur&amp;nbsp;&lt;a href=&quot;http://lwn.net/&quot;&gt;lwn.net&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/9103449066537298543/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2011/01/lire.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/9103449066537298543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/9103449066537298543'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2011/01/lire.html' title='A lire...'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-1993386733534937014</id><published>2010-11-09T07:25:00.000-08:00</published><updated>2011-06-07T01:55:41.974-07:00</updated><title type='text'>Développer des applications Adobe Flash sous GNU/Linux</title><content type='html'>On peut développer des applications Flash sous GNU/Linux en utilisant les outils d&#39;&lt;a href=&quot;http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK&quot;&gt;Adobe&lt;/a&gt;.&lt;br /&gt;
Voici les points essentiels qui me permettrons de mettre en place une application Flash.&lt;br /&gt;
&lt;ol&gt;&lt;li&gt; Téléchargez et installer le&amp;nbsp;&lt;a href=&quot;http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK&quot;&gt;Flex SDL&lt;/a&gt;. A cette date, j&#39;utilise la version 3 complète (environ 110Mo) &lt;/li&gt;
&lt;li&gt;Mettre en place l&#39;environnement Web local (apache2 et le fichier crossdomain.xml)&lt;/li&gt;
&lt;/ol&gt;&amp;nbsp;Voici un exemple d&#39;un fichier crossdomain.xml pour le développement, ce fichier est à copier à la racine du Web local.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;
&amp;lt;cross-domain-policy&amp;gt;
&amp;lt;allow-access-from domain=&quot;*&quot; /&amp;gt;
&amp;lt;/cross-domain-policy&amp;gt;&lt;/pre&gt;&lt;br /&gt;
Après avoir désarchivés les fichiers du SDK, j&#39;installe le compilateur en utilisant un script bash et le player flash par un lien symbolique.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;#!bin/sh
&amp;lt;chemin vers flex_sdk_3&amp;gt;/bin/mxmlc $*&lt;/pre&gt;&lt;br /&gt;
Cela permet au compilateur de retrouver les répertoires lib, ... qui sont spécifiés de manière relatives.&lt;br /&gt;
&lt;br /&gt;
Pour compiler un fichier mxml ou bien as et générer un swf il suffit de faire :&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;mxmlc &amp;lt;nom du fichier mxml ou as&amp;gt; 
&lt;/pre&gt;&lt;br /&gt;
Concernant, le développement, les différentes documentations fournies par Adobe en &lt;a href=&quot;http://livedocs.adobe.com/flex/3/html/&quot;&gt;ligne&lt;/a&gt; sont suffisantes.&lt;br /&gt;
&lt;br /&gt;
Cependant, juste pour rappel, le langage ActionScript 3 est orienté objet et possède la notion d&#39;interfaces (comme chez Java). &lt;br /&gt;
Au final, on peu s&#39;étonner de la ressemblance entre FlexSDK/ActionScript et JDK/Java.</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/1993386733534937014/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2010/11/developper-des-applications-adobe-flash.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/1993386733534937014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/1993386733534937014'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2010/11/developper-des-applications-adobe-flash.html' title='Développer des applications Adobe Flash sous GNU/Linux'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-7201819036603628159</id><published>2010-10-12T07:39:00.000-07:00</published><updated>2011-06-07T02:00:18.915-07:00</updated><title type='text'>SSH use for distant office</title><content type='html'>&lt;h2&gt;Make things automatic &lt;/h2&gt;&lt;br /&gt;
When I am at home, I usually need remote access to my servers at work, to check some documents or to fill some data on our CRM. We are using &lt;a href=&quot;http://www.openssh.com/&quot;&gt;openssh&lt;/a&gt; access to do remote maintenance of our products so I decide to provide that for remote access from home.&lt;br /&gt;
&lt;br /&gt;
The idea is to make most of the configuration automatic so I have wrote a configuration file for that (&lt;a href=&quot;http://linux.die.net/man/5/ssh_config&quot;&gt;~/.ssh/config&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;Host job
Hostname job.jeanpul.com
User jeanpul
Port 999
LocalForward *:8080 192.168.0.20:80
ControlMaster yes
&lt;/pre&gt;&lt;br /&gt;
With this configuration file, using the following command &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;ssh job 
&lt;/pre&gt;&lt;br /&gt;
open a SSH connection to job.jeanpul.com on port 999 and then gives access to the Web server of the distant machine 192.168.0.20 on the local port 8080.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Browse your Intranet without URL redirection problems&lt;/h2&gt;So, then I reach the office Intranet network using the http://localhost:8080/ but all the absolute URL cannot be reached. So URL&#39;s like :&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:html&quot;&gt;&amp;lt;a href=&quot;/PHPMyAdmin/index.html&quot;&amp;gt;PHPMyAdmin&amp;lt;/a&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
works because it&#39;s leads to http://localhost:8080/PHPMyAdmin/index.html but&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:html&quot;&gt;&amp;lt;a href=&quot;http://server1.office.net/PHPMyAdmin/index.html&quot;&amp;gt;PHPMyAdmin&amp;lt;/a&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
failed because server1.office.net have no meaning locally.&lt;br /&gt;
&lt;br /&gt;
The solution I used was to install and configure a Web proxy. I used &lt;a href=&quot;http://www.privoxy.org/&quot;&gt;privoxy&lt;/a&gt; with the following configuration part&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;forward   job.jeanpul.com    localhost:8080
 forward   server1.office.net localhost:8080
&lt;/pre&gt;&lt;br /&gt;
Then I configure my browsers to use this proxy and URLs such as&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:html&quot;&gt;http://server1.office.net/PHPMyAdmin/index.html
&lt;/pre&gt;&lt;br /&gt;
are correctly managed.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Removing password input&lt;/h2&gt;&lt;br /&gt;
I have configured my SSH server to support remote connexion using private/public key so I never enter the user password anymore.&lt;br /&gt;
&lt;br /&gt;
To do so, I have generated a private/public key :&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;ssh-keygen -t rsa&lt;/pre&gt;&lt;br /&gt;
Then, I have copied the public part to the SSH user on the remote access :&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;ssh-copy-id -i ~/.ssh/id_rsa.pub job.jeanpul.com&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/7201819036603628159/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2010/10/intensive-use-of-ssh-for-distant-office.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/7201819036603628159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/7201819036603628159'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2010/10/intensive-use-of-ssh-for-distant-office.html' title='SSH use for distant office'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-2046501695032637585</id><published>2010-10-12T00:37:00.000-07:00</published><updated>2010-10-12T00:41:24.711-07:00</updated><title type='text'>Sharing my Wifi connection</title><content type='html'>Sometimes, I need an Internet access on my &quot;old&quot; computer at home using my private Wifi network. I don&#39;t have any Wifi device on my computer and I need to move my computer close to the ADSL Router . So, I use some &lt;a href=&quot;http://http//netfilter.org/projects/iptables/index.html&quot;&gt;iptables&lt;/a&gt; commands on my laptop, to provide an Internet access to my &quot;old&quot; computer.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;gt; iptables --table nat --append POSTROUTING --out-interface wlan -j MASQUERADE
&amp;gt; iptables --append FORWARD --in-interface eth0 -j ACCEPT
&amp;gt; echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&amp;nbsp; &lt;/pre&gt;&lt;br /&gt;
This require that my &quot;old&quot; computer have access (same network domain), to my laptop and set its gateway to its eth0 ip adress. &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;gt; ifconfig eth0 inet 192.168.1.34
&amp;gt; route add default gw 192.168.1.35
&lt;/pre&gt;&lt;br /&gt;
finally, DNS is also configured.</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/2046501695032637585/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2010/10/sharing-my-wifi-connection.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/2046501695032637585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/2046501695032637585'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2010/10/sharing-my-wifi-connection.html' title='Sharing my Wifi connection'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8398869792658371506.post-9017871143753503275</id><published>2010-10-05T06:51:00.000-07:00</published><updated>2011-05-27T03:56:26.508-07:00</updated><title type='text'>Archiver ses mails avec IMAP</title><content type='html'>Cela fait 7 ans que je suis dans la même société et j&#39;ai toujours conservé mes mails. Cela m&#39;arrive d&#39;avoir besoin de revenir quelques années en arrière pour récupérer une info sur un projet ou des contacts. Au départ, j&#39;utilisait un compte POP3 et mes mails étaient donc archivés sur mon compte utilisateur. Nous avons ensuite changé de fournisseur et par la même occasion nous sommes passés sur IMAP.&lt;br /&gt;
&lt;br /&gt;
Je peux, aujourd&#39;hui, consulter mes mails depuis n&#39;importe quel accès Internet, cependant j&#39;ai récemment découvert que la taille de la boîte mail avait une limite de 2Go, dérisoire par rapport à mon ancien espace de stockage... Autre problème, mes anciens mails stockés sur mon disque local ne sont pas sur le serveur IMAP donc pas visible depuis l&#39;extèrieur.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;La synchro entre deux comptes IMAP...&lt;/h2&gt;L&#39;idée est de créer plusieurs boîtes mails d&#39;archives, par exemple jeanpul2010, jeanpul2009, ... et de transférer les mails de la boîte &quot;principale&quot; vers la/les boîtes archives. Pour faire le transfert, je vais commencer par utiliser un soft, développé par Gilles LAMIRAL. Cet outil se nomme&amp;nbsp;&lt;a href=&quot;http://www.linux-france.org/prj/imapsync/&quot;&gt;imapsync&lt;/a&gt;. La ligne de commande est on ne peut plus simple,&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:sql&quot;&gt;imapsync -host monserveurimap.net --user1 jeanpul --password1 jp --user2 jeanpul2010 --password2 jp --noauthmd5&lt;/pre&gt;&lt;br /&gt;
Cela permet de transférer (synchroniser) l&#39;ensemble des mails (avec les folders) d&#39;un compte vers un autre. Chez mon fournisseur (et cela ce comprend), chaque compte à une limite quotidienne de réception en nombre de mails, par conséquent lorsque il y a trop de mails à transférer, la commande échoue. On peut interrompre la commande et la relancer le lendemain sans problème, les mails déjà existant ne sont pas copiés.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;...puis entre un maildir et un compte IMAP&lt;/h2&gt;Utiliser imapsync permet donc un archivage régulier sans trop de&amp;nbsp;soucis. Cependant, dans mon cas, il me reste à rendre accessible mes mails qui sont stockés sur ma machine.&lt;br /&gt;
&lt;br /&gt;
Utiliser un serveur IMAP local&lt;br /&gt;
J&#39;utilise la solution&amp;nbsp;&lt;a href=&quot;http://www.courier-mta.org/&quot;&gt;Courier&lt;/a&gt;&amp;nbsp;qui comprends un serveur IMAP tournant sur le répertoire contenant les mails au format maildir. Mes mails étaient stockés par kmail au format maildir... de kmail. Le format est &quot;quasiment identique&quot;, avec un répertoire par folder contenant 3 sous répertoires cur, new et tmp. La solution Courier contient un binaire, maildirmake, qui permet de créer l&#39;arborescence comme il le faut et d&#39;y ajouter des folders. Cette commande m&#39;a permit de comparer le format maildir de &quot;kmail&quot; au format maildir de Courier afin d&#39;automatiser le passage de l&#39;un à l&#39;autre.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Manipuler des comptes IMAP par scripts&lt;/h2&gt;Pour aller plus loin et faire des opérations plus précises sur les comptes IMAP, j&#39;ai découvert l&#39;utilitaire&amp;nbsp;&lt;a href=&quot;http://imapfilter.hellug.gr/&quot;&gt;imapfilter&lt;/a&gt;&amp;nbsp;qui permet d&#39;exécuter un script écrit en&amp;nbsp;&lt;a href=&quot;http://www.lua.org/&quot;&gt;Lua&lt;/a&gt;&amp;nbsp;et une API pour accéder et manipuler les comptes IMAP.&lt;br /&gt;
&lt;br /&gt;
Voici un exemple de script permettant de copier (à la façon de imapsync mais sans la synchro) les mails et les folders d&#39;un compte vers un autre pour une année donnée.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;function copy_year(year, src, dst)
   results = src:sent_before(&#39;01-Jan-&#39; .. (year+1)) * src:sent_since(&#39;01-Jan&#39; .. year)
   results:copy_messages(dst)
end
&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;function get_folder(folders, folder)
   for k, v in ipairs(folders) do
      if v:upper() == folder:upper() then
        return v
      end
   end
   return false
end
&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;function copy_folders_rec(year, folder, src, dst)
   for _, f in ipairs(src:list_all(folder)) do
      dstfolder = get_folder(dst:list_all(folder), f)
      if not dstfolder then
        dst:create_mailbox(f)
        dst:subscribe_mailbox(f)
        dstfolder = f
      end
      copy_year(year, src[f], dst[dstfolder])
      copy_folders_rec(year, f, src, dst)
   end
end
&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;srcaccount = IMAP {
   server = &#39;localhost&#39;,
   username = &#39;jeanpul&#39;,
   password = &#39;jp&#39;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;dstaccount = IMAP {
   server = &#39;imap.server.net&#39;,
   username = &#39;jp2007@jeanpul.com&#39;,
   password = &#39;jp&#39;
}     
&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:java&quot;&gt;copy_folders_rec(&quot;2006&quot;, null, srcaccount, dstaccount)
&lt;/pre&gt;&lt;br /&gt;
J&#39;utilise plus volontiers cette méthode car elle me permet également de faire tout un tas d&#39;opérations de filtrage, de création/suppression et la gestion des dates est très pratique.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;La suite...&lt;/h2&gt;&lt;br /&gt;
Maintenant que mes mails sont archivés, accessibles depuis n&#39;importe quel poste connecté à Internet, il me reste quand même un problème... les filtres. En effet, il serait bienvenue d&#39;avoir ces filtres au niveau du serveur IMAP, sinon, il faut systématiquement avoir les mêmes règles de filtrages (sur certains clients Web, les filtres n&#39;existent même pas) sur chaque client mail (Thunderbird, kmail, evolution, ...). En utilisant les scripts et imapfilter, cela pourrait être réalisable, cependant cela nécessiterai l&#39;exécution des scripts depuis ma machine.</content><link rel='replies' type='application/atom+xml' href='http://jeanpul.blogspot.com/feeds/9017871143753503275/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://jeanpul.blogspot.com/2010/10/archiver-ses-mails-avec-imap.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/9017871143753503275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8398869792658371506/posts/default/9017871143753503275'/><link rel='alternate' type='text/html' href='http://jeanpul.blogspot.com/2010/10/archiver-ses-mails-avec-imap.html' title='Archiver ses mails avec IMAP'/><author><name>Jeanpul</name><uri>http://www.blogger.com/profile/05958302550006542863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='27' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57Tda1l_oYkhDFnXPaKD_4xLyJpbwMJqj8td0VW6t9T0h1jfcoc-NMU5Y9mUR91Gbf8p24fgeH7hM30hmc1goZN6nYd1CNmlKNX-ILK0s96j1ts5dFAU_zrdS0Bpr09Q/s220/MaPhoto.jpg'/></author><thr:total>0</thr:total></entry></feed>