<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>http://www.bricosoft.com/index.php?action=history&amp;feed=atom&amp;title=Xargs</id>
	<title>Xargs - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="http://www.bricosoft.com/index.php?action=history&amp;feed=atom&amp;title=Xargs"/>
	<link rel="alternate" type="text/html" href="http://www.bricosoft.com/index.php?title=Xargs&amp;action=history"/>
	<updated>2026-11-17T08:50:47Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>http://www.bricosoft.com/index.php?title=Xargs&amp;diff=2027&amp;oldid=prev</id>
		<title>Nettoyage gabarit : Nettoyage : gabarit 2012 (widgets Twitter/Google/DISQUS morts et fichiers fantômes)</title>
		<link rel="alternate" type="text/html" href="http://www.bricosoft.com/index.php?title=Xargs&amp;diff=2027&amp;oldid=prev"/>
		<updated>2026-11-03T19:56:34Z</updated>

		<summary type="html">&lt;p&gt;Nettoyage : gabarit 2012 (widgets Twitter/Google/DISQUS morts et fichiers fantômes)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version du 3 novembre 2026 à 19:56&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Ligne 1 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 1 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Fichier:Spockwin.gif|thumb|450px|Ce qu&amp;#039;il risque de se passer si vous utilisez xargs]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Fichier:Spockwin.gif|thumb|450px|Ce qu&amp;#039;il risque de se passer si vous utilisez xargs]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;div class=&quot;thumb tright&quot;&amp;gt;{{#widget:Twitter Search |query={{PAGENAME}} |title=Bricosoft.com/{{PAGENAME}} |caption=Ce que les gens disent sur {{PAGENAME}} }} &amp;lt;/div&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{lowercase}}&amp;#039;&amp;#039;&amp;#039;xargs&amp;#039;&amp;#039;&amp;#039; est une commande unix pour construire, manipuler des lignes de commandes depuis [[stdin]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{lowercase}}&amp;#039;&amp;#039;&amp;#039;xargs&amp;#039;&amp;#039;&amp;#039; est une commande unix pour construire, manipuler des lignes de commandes depuis [[stdin]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l28&quot;&gt;Ligne 28 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 27 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  un dous&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  un dous&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ...&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Total du nombre de lignes de logs apache + ventilation par virtual host triée==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Total du nombre de lignes de logs apache + ventilation par virtual host triée==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l71&quot;&gt;Ligne 71 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 69 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Liens==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Liens==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*http://offbytwo.com/2011/06/26/things-you-didnt-know-about-xargs.html&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*http://offbytwo.com/2011/06/26/things-you-didnt-know-about-xargs.html&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{#widget:DISQUS&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|id=bricosoft&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|uniqid={{PAGENAME}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|url={{fullurl:{{PAGENAME}}}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|url={{fullurl:{{PAGENAME}}}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key www_bricosoft_com-mw:diff:1.41:old-569:rev-2027:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Nettoyage gabarit</name></author>
	</entry>
	<entry>
		<id>http://www.bricosoft.com/index.php?title=Xargs&amp;diff=569&amp;oldid=prev</id>
		<title>Sysop le 9 novembre 2012 à 10:12</title>
		<link rel="alternate" type="text/html" href="http://www.bricosoft.com/index.php?title=Xargs&amp;diff=569&amp;oldid=prev"/>
		<updated>2012-11-09T10:12:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Fichier:Spockwin.gif|thumb|450px|Ce qu&amp;#039;il risque de se passer si vous utilisez xargs]]&lt;br /&gt;
&amp;lt;div class=&amp;quot;thumb tright&amp;quot;&amp;gt;{{#widget:Twitter Search |query={{PAGENAME}} |title=Bricosoft.com/{{PAGENAME}} |caption=Ce que les gens disent sur {{PAGENAME}} }} &amp;lt;/div&amp;gt;&lt;br /&gt;
{{lowercase}}&amp;#039;&amp;#039;&amp;#039;xargs&amp;#039;&amp;#039;&amp;#039; est une commande unix pour construire, manipuler des lignes de commandes depuis [[stdin]].&lt;br /&gt;
&lt;br /&gt;
un, uno 	dous, douei, douas 	très 	quatre 	cinq 	siès 	sèt 	vuech 	nòu&lt;br /&gt;
Par exemple :&lt;br /&gt;
 $ echo &amp;#039;un&lt;br /&gt;
 &amp;gt; dous&lt;br /&gt;
 &amp;gt; très&lt;br /&gt;
 &amp;gt; ...&lt;br /&gt;
 &amp;gt; vuech&amp;#039; | xargs yes&lt;br /&gt;
&lt;br /&gt;
Renverra la meme sortie que :&lt;br /&gt;
 $ yes un dous très quatre cinq siès sèt vuech&lt;br /&gt;
 un dous très quatre cinq siès sèt vuech&lt;br /&gt;
 un dous très quatre cinq siès sèt vuech&lt;br /&gt;
 ...&lt;br /&gt;
 un dous très quatre cinq siès sèt vuech&lt;br /&gt;
&lt;br /&gt;
Si on ne veut que les deux premiers arguments :&lt;br /&gt;
 $ echo &amp;#039;un&lt;br /&gt;
 &amp;gt; dous&lt;br /&gt;
 &amp;gt; très&lt;br /&gt;
 &amp;gt; ...&lt;br /&gt;
 &amp;gt; vuech&amp;#039; | xargs -L 2 yes&lt;br /&gt;
 &lt;br /&gt;
 un dous&lt;br /&gt;
 un dous&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Total du nombre de lignes de logs apache + ventilation par virtual host triée==&lt;br /&gt;
&lt;br /&gt;
 root@b:/var/log/apache2# ls *.log |xargs wc -l | sort -nr | head&lt;br /&gt;
  23219 total&lt;br /&gt;
  12954 www.bricosoft.com-access.log&lt;br /&gt;
   2319 www.plop.zz-access.log&lt;br /&gt;
   2128 www.gni.zu-access.log&lt;br /&gt;
   1530 wikileaks.plop.zz-access.log&lt;br /&gt;
   1105 www.bricosoft.com-error.log&lt;br /&gt;
    391 other_vhosts_access.log&lt;br /&gt;
    300 error.log&lt;br /&gt;
&lt;br /&gt;
== Utiliser une variable ==&lt;br /&gt;
Le résultat de la recherche([[find]]) est passé comme 1er paramètre de [[mv]] qui déplace tout dans ~/mes_images/ :&lt;br /&gt;
 $ find . -name &amp;#039;*.jpg&amp;#039; -print0 | xargs -I % mv % ~/mes_images/&lt;br /&gt;
% remplace le résultat de la recherche. Vous pouvez utiliser un autre nom de variable que %, comme ici (PHOTOS_DE_LA_BELLE_DOCHE) :&lt;br /&gt;
 $ find . -name &amp;#039;*.jpg&amp;#039; -print0 | xargs -I LES_JPGS mv LES_JPGS ~/mes_images/&lt;br /&gt;
&lt;br /&gt;
== travailler par paire d&amp;#039;arguments ==&lt;br /&gt;
Certaines commandes comme [[diff]] travaillent sur deux paramètre, l&amp;#039;option -n 2 de xargs permet de construire la bonne CLI depuis l&amp;#039;entrée.&lt;br /&gt;
&lt;br /&gt;
 $ echo {1..8} | xargs -n 2&lt;br /&gt;
 1 2&lt;br /&gt;
 3 4&lt;br /&gt;
 5 6&lt;br /&gt;
 7 8&lt;br /&gt;
&lt;br /&gt;
== Executer en parallèle ==&lt;br /&gt;
[[Fichier:Passante-ecouteurs.gif|right]]&lt;br /&gt;
En séquentiel, chaque CLI est lancé un par un, ça dure 6 s. :&lt;br /&gt;
 $ time echo {2,2,2} | xargs -n 1 sleep&lt;br /&gt;
 real	0m6.006s&lt;br /&gt;
&lt;br /&gt;
En parallèle, ça dure 2 s. :&lt;br /&gt;
 $ time echo {2,2,2} | xargs -n 1 -P 3 sleep&lt;br /&gt;
 real	0m2.006s&lt;br /&gt;
&lt;br /&gt;
{{commandes unix}}&lt;br /&gt;
&lt;br /&gt;
==Liens==&lt;br /&gt;
*http://offbytwo.com/2011/06/26/things-you-didnt-know-about-xargs.html&lt;br /&gt;
{{#widget:DISQUS&lt;br /&gt;
|id=bricosoft&lt;br /&gt;
|uniqid={{PAGENAME}}&lt;br /&gt;
|url={{fullurl:{{PAGENAME}}}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Sysop</name></author>
	</entry>
</feed>