<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fi">
	<id>https://www.linux.fi/w/index.php?action=history&amp;feed=atom&amp;title=Xargs</id>
	<title>Xargs - Muutoshistoria</title>
	<link rel="self" type="application/atom+xml" href="https://www.linux.fi/w/index.php?action=history&amp;feed=atom&amp;title=Xargs"/>
	<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Xargs&amp;action=history"/>
	<updated>2026-04-22T22:35:25Z</updated>
	<subtitle>Tämän sivun muutoshistoria</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://www.linux.fi/w/index.php?title=Xargs&amp;diff=42328&amp;oldid=prev</id>
		<title>Oselotti (4. huhtikuuta 2015 kello 21.23)</title>
		<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Xargs&amp;diff=42328&amp;oldid=prev"/>
		<updated>2015-04-04T21:23:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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;fi&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Vanhempi versio&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versio 5. huhtikuuta 2015 kello 00.23&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;Rivi 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rivi 1:&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;{{DISPLAYTITLE:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xargs&lt;/del&gt;}}&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{lcfirst:{{PAGENAME}}}}&lt;/ins&gt;}}&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;&amp;#039;&amp;#039;&amp;#039;xargs&amp;#039;&amp;#039;&amp;#039;-[[komentorivi|komentorivityökalu]] mahdollistaa [[STDIN]]:in kautta sille syötettävän tekstin antamisen riveittäin tai sanoittain toiselle ohjelmalle argumentiksi. Esimerkiksi komento&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;&amp;#039;&amp;#039;&amp;#039;xargs&amp;#039;&amp;#039;&amp;#039;-[[komentorivi|komentorivityökalu]] mahdollistaa [[STDIN]]:in kautta sille syötettävän tekstin antamisen riveittäin tai sanoittain toiselle ohjelmalle argumentiksi. Esimerkiksi komento&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;  $ [[find]] -name &amp;#039;kjk*&amp;#039; | xargs [[rm]]&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;  $ [[find]] -name &amp;#039;kjk*&amp;#039; | xargs [[rm]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Oselotti</name></author>
	</entry>
	<entry>
		<id>https://www.linux.fi/w/index.php?title=Xargs&amp;diff=41239&amp;oldid=prev</id>
		<title>Oselotti (14. marraskuuta 2014 kello 19.20)</title>
		<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Xargs&amp;diff=41239&amp;oldid=prev"/>
		<updated>2014-11-14T19:20:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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;fi&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Vanhempi versio&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versio 14. marraskuuta 2014 kello 22.20&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;Rivi 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rivi 1:&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;Xargs&lt;/del&gt;-[[komentorivi|komentorivityökalu]] mahdollistaa [[STDIN]]:in kautta sille syötettävän tekstin antamisen riveittäin tai sanoittain toiselle ohjelmalle argumentiksi. Esimerkiksi komento&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{DISPLAYTITLE:xargs}}&lt;/ins&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;  [[find]] -name &#039;kjk*&#039; | xargs [[rm]]&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;xargs&#039;&#039;&#039;&lt;/ins&gt;-[[komentorivi|komentorivityökalu]] mahdollistaa [[STDIN]]:in kautta sille syötettävän tekstin antamisen riveittäin tai sanoittain toiselle ohjelmalle argumentiksi. Esimerkiksi komento&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$ &lt;/ins&gt;[[find]] -name &#039;kjk*&#039; | xargs [[rm]]&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;poistaisi kaikki ls:n listaamat kjk-alkuiset tiedostot. Pelkkä&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;poistaisi kaikki ls:n listaamat kjk-alkuiset tiedostot. Pelkkä&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;  find -name &#039;kjk*&#039; | rm&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$ &lt;/ins&gt;find -name &#039;kjk*&#039; | rm&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;ei toimi, sillä tässä koko find-komennon tuloste putkitetaan rm:lle yhtenä klönttinä, mitä rm ei ymmärrä.&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;ei toimi, sillä tässä koko find-komennon tuloste putkitetaan rm:lle yhtenä klönttinä, mitä rm ei ymmärrä.&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 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;Syötettävillä riveillä on usein välilyöntejä ja muita erikoismerkkejä, joita vastaanottava ohjelma ei useinkaan ymmärrä sinällään. Vastaanottava ohjelma saattaa myös haluta syötteen joksikin muuksi kuin viimeiseksi argumentikseen. Tällöin on yhtenä ratkaisuna käyttää seuraavan komennon kaltaista syntaksia:&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;Syötettävillä riveillä on usein välilyöntejä ja muita erikoismerkkejä, joita vastaanottava ohjelma ei useinkaan ymmärrä sinällään. Vastaanottava ohjelma saattaa myös haluta syötteen joksikin muuksi kuin viimeiseksi argumentikseen. Tällöin on yhtenä ratkaisuna käyttää seuraavan komennon kaltaista syntaksia:&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;  [[tac]] valilyonnit.txt | xargs -I&#039;{}&#039; [[dd]] if=/dev/urandom of=&#039;{}&#039; bs=1024 count=2048&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$ &lt;/ins&gt;[[tac]] valilyonnit.txt | xargs -I&#039;{}&#039; [[dd]] if=/dev/urandom of=&#039;{}&#039; bs=1024 count=2048&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;Tässä luodaan takaperin riveittäin tulostetun tiedoston valilyonnit.txt jokaisesta rivistä samanniminen tiedosto, joka sisältää 2 Mt satunnaista dataa. Apuna käytetään valitsinta &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;, jolle annetaan argumenttina se merkki tai merkkijono, jota käytetään merkitsemään vastaanottavan ohjelman argumentin paikkaa. {}:tä käytetään sangen usein tähän tehtävään, mutta halutetessaan voi käyttää vaikkapa å:ta. Nämä merkit kannattaa laittaa yksinkertaisiin lainausmerkkeihin (&amp;#039;), mikäli ne ovat [[komentotulkki|komentotulkin]] käyttämiä erikoismerkkejä.&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;Tässä luodaan takaperin riveittäin tulostetun tiedoston valilyonnit.txt jokaisesta rivistä samanniminen tiedosto, joka sisältää 2 Mt satunnaista dataa. Apuna käytetään valitsinta &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;, jolle annetaan argumenttina se merkki tai merkkijono, jota käytetään merkitsemään vastaanottavan ohjelman argumentin paikkaa. {}:tä käytetään sangen usein tähän tehtävään, mutta halutetessaan voi käyttää vaikkapa å:ta. Nämä merkit kannattaa laittaa yksinkertaisiin lainausmerkkeihin (&amp;#039;), mikäli ne ovat [[komentotulkki|komentotulkin]] käyttämiä erikoismerkkejä.&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 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;Välilyöntien ja erikoismerkkien ongelmaa voi yrittää ratkaista myös valitsimella &amp;lt;tt&amp;gt;-0&amp;lt;/tt&amp;gt;, joka määrittää syötettävien merkkijonojen rajaksi nollamerkin normaalien välilyönnin tai rivinvaihdon sijaan. Tälle sopivaa tulostetta tuottaa ainakin [[find]] valitsimella &amp;lt;tt&amp;gt;-print0&amp;lt;/tt&amp;gt;. Esimerkiksi&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;Välilyöntien ja erikoismerkkien ongelmaa voi yrittää ratkaista myös valitsimella &amp;lt;tt&amp;gt;-0&amp;lt;/tt&amp;gt;, joka määrittää syötettävien merkkijonojen rajaksi nollamerkin normaalien välilyönnin tai rivinvaihdon sijaan. Tälle sopivaa tulostetta tuottaa ainakin [[find]] valitsimella &amp;lt;tt&amp;gt;-print0&amp;lt;/tt&amp;gt;. Esimerkiksi&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;  find -lname &#039;*s*&#039; -print0 | xargs -0 [[file]]&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$ &lt;/ins&gt;find -lname &#039;*s*&#039; -print0 | xargs -0 [[file]]&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;näyttäisi nykyisen hakemiston ja sen alihakemistojen sisältämien [[symbolinen linkki|symbolisten linkkien]] joiden nimessä on s-kirjain, kohdetiedostot.&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;näyttäisi nykyisen hakemiston ja sen alihakemistojen sisältämien [[symbolinen linkki|symbolisten linkkien]] joiden nimessä on s-kirjain, kohdetiedostot.&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 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;Valitsimella &amp;lt;tt&amp;gt;-d&amp;lt;/tt&amp;gt; voidaan määritellä syötettävien merkkijonojen rajaksi vapaavalinteinen yhden tavun mittainen merkki (esimerkiksi [[Unicode]]-ä ei siis käy). Valitsimella &amp;lt;tt&amp;gt;-a&amp;lt;/tt&amp;gt; voidaan suoraan valita xargsin syötteeksi annettava tiedosto. Esimerkiksi komento&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;Valitsimella &amp;lt;tt&amp;gt;-d&amp;lt;/tt&amp;gt; voidaan määritellä syötettävien merkkijonojen rajaksi vapaavalinteinen yhden tavun mittainen merkki (esimerkiksi [[Unicode]]-ä ei siis käy). Valitsimella &amp;lt;tt&amp;gt;-a&amp;lt;/tt&amp;gt; voidaan suoraan valita xargsin syötteeksi annettava tiedosto. Esimerkiksi komento&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;  xargs -d w -a t.txt [[touch]]&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$ &lt;/ins&gt;xargs -d w -a t.txt [[touch]]&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;loisi touchin avulla tiedostot b.txt n.txt ja m.txt, kun tiedoston t.txt sisältönä on&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;loisi touchin avulla tiedostot b.txt n.txt ja m.txt, kun tiedoston t.txt sisältönä on&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;  b.txtwn.txtwm.txtw&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;  b.txtwn.txtwm.txtw&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 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;== Katso myös ==&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Katso myös==&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;*[[Find]]&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;*[[Find]]&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 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;[[Luokka:Komentorivin perustyökalut]]&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;[[Luokka:Komentorivin perustyökalut]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Oselotti</name></author>
	</entry>
	<entry>
		<id>https://www.linux.fi/w/index.php?title=Xargs&amp;diff=37125&amp;oldid=prev</id>
		<title>80.222.237.18 (19. tammikuuta 2013 kello 13.37)</title>
		<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Xargs&amp;diff=37125&amp;oldid=prev"/>
		<updated>2013-01-19T13:37:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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;fi&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Vanhempi versio&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versio 19. tammikuuta 2013 kello 16.37&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-l7&quot;&gt;Rivi 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rivi 7:&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;Syötettävillä riveillä on usein välilyöntejä ja muita erikoismerkkejä, joita vastaanottava ohjelma ei useinkaan ymmärrä sinällään. Vastaanottava ohjelma saattaa myös haluta syötteen joksikin muuksi kuin viimeiseksi argumentikseen. Tällöin on yhtenä ratkaisuna käyttää seuraavan komennon kaltaista syntaksia:&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;Syötettävillä riveillä on usein välilyöntejä ja muita erikoismerkkejä, joita vastaanottava ohjelma ei useinkaan ymmärrä sinällään. Vastaanottava ohjelma saattaa myös haluta syötteen joksikin muuksi kuin viimeiseksi argumentikseen. Tällöin on yhtenä ratkaisuna käyttää seuraavan komennon kaltaista syntaksia:&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;  [[tac]] valilyonnit.txt | xargs -I&amp;#039;{}&amp;#039; [[dd]] if=/dev/urandom of=&amp;#039;{}&amp;#039; bs=1024 count=2048&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;  [[tac]] valilyonnit.txt | xargs -I&amp;#039;{}&amp;#039; [[dd]] if=/dev/urandom of=&amp;#039;{}&amp;#039; bs=1024 count=2048&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;Tässä luodaan &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;väärinpäin &lt;/del&gt;tulostetun tiedoston valilyonnit.txt jokaisesta rivistä samanniminen tiedosto, joka sisältää 2 Mt satunnaista dataa. Apuna käytetään valitsinta &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;, jolle annetaan argumenttina se merkki tai merkkijono, jota käytetään merkitsemään vastaanottavan ohjelman argumentin paikkaa. {}:tä käytetään sangen usein tähän tehtävään, mutta halutetessaan voi käyttää vaikkapa å:ta. Nämä merkit kannattaa laittaa yksinkertaisiin lainausmerkkeihin (&#039;), mikäli ne ovat [[komentotulkki|komentotulkin]] käyttämiä erikoismerkkejä.&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Tässä luodaan &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;takaperin riveittäin &lt;/ins&gt;tulostetun tiedoston valilyonnit.txt jokaisesta rivistä samanniminen tiedosto, joka sisältää 2 Mt satunnaista dataa. Apuna käytetään valitsinta &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;, jolle annetaan argumenttina se merkki tai merkkijono, jota käytetään merkitsemään vastaanottavan ohjelman argumentin paikkaa. {}:tä käytetään sangen usein tähän tehtävään, mutta halutetessaan voi käyttää vaikkapa å:ta. Nämä merkit kannattaa laittaa yksinkertaisiin lainausmerkkeihin (&#039;), mikäli ne ovat [[komentotulkki|komentotulkin]] käyttämiä erikoismerkkejä.&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 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;Välilyöntien ja erikoismerkkien ongelmaa voi yrittää ratkaista myös valitsimella &amp;lt;tt&amp;gt;-0&amp;lt;/tt&amp;gt;, joka määrittää syötettävien merkkijonojen rajaksi nollamerkin normaalien välilyönnin tai rivinvaihdon sijaan. Tälle sopivaa tulostetta tuottaa ainakin [[find]] valitsimella &amp;lt;tt&amp;gt;-print0&amp;lt;/tt&amp;gt;. Esimerkiksi&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;Välilyöntien ja erikoismerkkien ongelmaa voi yrittää ratkaista myös valitsimella &amp;lt;tt&amp;gt;-0&amp;lt;/tt&amp;gt;, joka määrittää syötettävien merkkijonojen rajaksi nollamerkin normaalien välilyönnin tai rivinvaihdon sijaan. Tälle sopivaa tulostetta tuottaa ainakin [[find]] valitsimella &amp;lt;tt&amp;gt;-print0&amp;lt;/tt&amp;gt;. Esimerkiksi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>80.222.237.18</name></author>
	</entry>
	<entry>
		<id>https://www.linux.fi/w/index.php?title=Xargs&amp;diff=37124&amp;oldid=prev</id>
		<title>80.222.237.18: Stilistisiä muutoksia</title>
		<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Xargs&amp;diff=37124&amp;oldid=prev"/>
		<updated>2013-01-19T13:36:23Z</updated>

		<summary type="html">&lt;p&gt;Stilistisiä muutoksia&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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;fi&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Vanhempi versio&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versio 19. tammikuuta 2013 kello 16.36&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-l6&quot;&gt;Rivi 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rivi 6:&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;Syötettävillä riveillä on usein välilyöntejä ja muita erikoismerkkejä, joita vastaanottava ohjelma ei useinkaan ymmärrä sinällään. Vastaanottava ohjelma saattaa myös haluta syötteen joksikin muuksi kuin viimeiseksi argumentikseen. Tällöin on yhtenä ratkaisuna käyttää seuraavan komennon kaltaista syntaksia:&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;Syötettävillä riveillä on usein välilyöntejä ja muita erikoismerkkejä, joita vastaanottava ohjelma ei useinkaan ymmärrä sinällään. Vastaanottava ohjelma saattaa myös haluta syötteen joksikin muuksi kuin viimeiseksi argumentikseen. Tällöin on yhtenä ratkaisuna käyttää seuraavan komennon kaltaista syntaksia:&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;  [[tac]] valilyonnit.txt|xargs -I&#039;{}&#039; [[dd]] if=/dev/urandom of=&#039;{}&#039; bs=1024 count=2048&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  [[tac]] valilyonnit.txt | xargs -I&#039;{}&#039; [[dd]] if=/dev/urandom of=&#039;{}&#039; bs=1024 count=2048&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;Tässä luodaan väärinpäin tulostetun tiedoston valilyonnit.txt jokaisesta rivistä samanniminen tiedosto, joka sisältää 2 Mt satunnaista dataa. Apuna käytetään valitsinta &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;, jolle annetaan argumenttina se merkki tai merkkijono, jota käytetään merkitsemään vastaanottavan ohjelman argumentin paikkaa. {}:tä käytetään sangen usein tähän tehtävään, mutta halutetessaan voi käyttää vaikkapa å:ta. Nämä merkit kannattaa laittaa yksinkertaisiin lainausmerkkeihin (&amp;#039;), mikäli ne ovat [[komentotulkki|komentotulkin]] käyttämiä erikoismerkkejä.&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;Tässä luodaan väärinpäin tulostetun tiedoston valilyonnit.txt jokaisesta rivistä samanniminen tiedosto, joka sisältää 2 Mt satunnaista dataa. Apuna käytetään valitsinta &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;, jolle annetaan argumenttina se merkki tai merkkijono, jota käytetään merkitsemään vastaanottavan ohjelman argumentin paikkaa. {}:tä käytetään sangen usein tähän tehtävään, mutta halutetessaan voi käyttää vaikkapa å:ta. Nämä merkit kannattaa laittaa yksinkertaisiin lainausmerkkeihin (&amp;#039;), mikäli ne ovat [[komentotulkki|komentotulkin]] käyttämiä erikoismerkkejä.&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 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;Välilyöntien ja erikoismerkkien ongelmaa voi yrittää ratkaista myös valitsimella &amp;lt;tt&amp;gt;-0&amp;lt;/tt&amp;gt;, joka määrittää syötettävien merkkijonojen rajaksi nollamerkin normaalien välilyönnin tai rivinvaihdon sijaan. Tälle sopivaa tulostetta tuottaa ainakin [[find]] valitsimella &amp;lt;tt&amp;gt;-print0&amp;lt;/tt&amp;gt;. Esimerkiksi&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;Välilyöntien ja erikoismerkkien ongelmaa voi yrittää ratkaista myös valitsimella &amp;lt;tt&amp;gt;-0&amp;lt;/tt&amp;gt;, joka määrittää syötettävien merkkijonojen rajaksi nollamerkin normaalien välilyönnin tai rivinvaihdon sijaan. Tälle sopivaa tulostetta tuottaa ainakin [[find]] valitsimella &amp;lt;tt&amp;gt;-print0&amp;lt;/tt&amp;gt;. Esimerkiksi&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;  find -lname &#039;*s*&#039; -print0|xargs -0 [[file]]&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  find -lname &#039;*s*&#039; -print0 | xargs -0 [[file]]&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;näyttäisi nykyisen hakemiston ja sen alihakemistojen sisältämien [[symbolinen linkki|symbolisten linkkien]] joiden nimessä on s-kirjain, kohdetiedostot.&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;näyttäisi nykyisen hakemiston ja sen alihakemistojen sisältämien [[symbolinen linkki|symbolisten linkkien]] joiden nimessä on s-kirjain, kohdetiedostot.&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 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;Valitsimella &amp;lt;tt&amp;gt;-d&amp;lt;/tt&amp;gt; voidaan määritellä syötettävien merkkijonojen rajaksi vapaavalinteinen yhden tavun mittainen merkki (esimerkiksi [[Unicode]]-ä ei siis käy). Valitsimella &amp;lt;tt&amp;gt;-a&amp;lt;/tt&amp;gt; voidaan suoraan valita xargsin syötteeksi annettava tiedosto. Esimerkiksi komento&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;Valitsimella &amp;lt;tt&amp;gt;-d&amp;lt;/tt&amp;gt; voidaan määritellä syötettävien merkkijonojen rajaksi vapaavalinteinen yhden tavun mittainen merkki (esimerkiksi [[Unicode]]-ä ei siis käy). Valitsimella &amp;lt;tt&amp;gt;-a&amp;lt;/tt&amp;gt; voidaan suoraan valita xargsin syötteeksi annettava tiedosto. Esimerkiksi komento&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;  xargs -d w -a t.txt [[touch]]&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;  xargs -d w -a t.txt [[touch]]&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;Loisi &lt;/del&gt;touchin avulla tiedostot b.txt n.txt ja m.txt, kun tiedoston t.txt sisältönä on&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;loisi &lt;/ins&gt;touchin avulla tiedostot b.txt n.txt ja m.txt, kun tiedoston t.txt sisältönä on&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;  b.txtwn.txtwm.txtw&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;  b.txtwn.txtwm.txtw&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;/table&gt;</summary>
		<author><name>80.222.237.18</name></author>
	</entry>
	<entry>
		<id>https://www.linux.fi/w/index.php?title=Xargs&amp;diff=37123&amp;oldid=prev</id>
		<title>80.222.237.18: Tehdään ongelmasta hieman paremmin motivoitu; ls on vain katsottavaksi.</title>
		<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Xargs&amp;diff=37123&amp;oldid=prev"/>
		<updated>2013-01-19T13:35:14Z</updated>

		<summary type="html">&lt;p&gt;Tehdään ongelmasta hieman paremmin motivoitu; ls on vain katsottavaksi.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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;fi&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Vanhempi versio&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versio 19. tammikuuta 2013 kello 16.35&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;Rivi 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rivi 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;Xargs-[[komentorivi|komentorivityökalu]] mahdollistaa [[STDIN]]:in kautta sille syötettävän tekstin antamisen riveittäin tai sanoittain toiselle ohjelmalle argumentiksi. Esimerkiksi komento&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;Xargs-[[komentorivi|komentorivityökalu]] mahdollistaa [[STDIN]]:in kautta sille syötettävän tekstin antamisen riveittäin tai sanoittain toiselle ohjelmalle argumentiksi. Esimerkiksi komento&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;ls&lt;/del&gt;]] kjk*|xargs [[rm]]&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;find&lt;/ins&gt;]] &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-name &#039;&lt;/ins&gt;kjk*&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039; &lt;/ins&gt;| xargs [[rm]]&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;poistaisi kaikki ls:n listaamat kjk-alkuiset tiedostot. Pelkkä&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;poistaisi kaikki ls:n listaamat kjk-alkuiset tiedostot. Pelkkä&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;ls &lt;/del&gt;kjk*|rm&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;find -name &#039;&lt;/ins&gt;kjk*&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039; &lt;/ins&gt;| rm&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;ei toimi, sillä tässä koko &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ls:n &lt;/del&gt;tuloste putkitetaan rm:lle yhtenä klönttinä, mitä rm ei ymmärrä.&lt;/div&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;ei toimi, sillä tässä koko &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;find-komennon &lt;/ins&gt;tuloste putkitetaan rm:lle yhtenä klönttinä, mitä rm ei ymmärrä.&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 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;Syötettävillä riveillä on usein välilyöntejä ja muita erikoismerkkejä, joita vastaanottava ohjelma ei useinkaan ymmärrä sinällään. Vastaanottava ohjelma saattaa myös haluta syötteen joksikin muuksi kuin viimeiseksi argumentikseen. Tällöin on yhtenä ratkaisuna käyttää seuraavan komennon kaltaista syntaksia:&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;Syötettävillä riveillä on usein välilyöntejä ja muita erikoismerkkejä, joita vastaanottava ohjelma ei useinkaan ymmärrä sinällään. Vastaanottava ohjelma saattaa myös haluta syötteen joksikin muuksi kuin viimeiseksi argumentikseen. Tällöin on yhtenä ratkaisuna käyttää seuraavan komennon kaltaista syntaksia:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>80.222.237.18</name></author>
	</entry>
	<entry>
		<id>https://www.linux.fi/w/index.php?title=Xargs&amp;diff=15922&amp;oldid=prev</id>
		<title>Pb: -0, -d ja -a -valitsimet</title>
		<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Xargs&amp;diff=15922&amp;oldid=prev"/>
		<updated>2007-06-23T22:21:57Z</updated>

		<summary type="html">&lt;p&gt;-0, -d ja -a -valitsimet&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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;fi&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Vanhempi versio&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versio 24. kesäkuuta 2007 kello 01.21&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-l8&quot;&gt;Rivi 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Rivi 8:&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;  [[tac]] valilyonnit.txt|xargs -I&amp;#039;{}&amp;#039; [[dd]] if=/dev/urandom of=&amp;#039;{}&amp;#039; bs=1024 count=2048&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;  [[tac]] valilyonnit.txt|xargs -I&amp;#039;{}&amp;#039; [[dd]] if=/dev/urandom of=&amp;#039;{}&amp;#039; bs=1024 count=2048&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;Tässä luodaan väärinpäin tulostetun tiedoston valilyonnit.txt jokaisesta rivistä samanniminen tiedosto, joka sisältää 2 Mt satunnaista dataa. Apuna käytetään valitsinta &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;, jolle annetaan argumenttina se merkki tai merkkijono, jota käytetään merkitsemään vastaanottavan ohjelman argumentin paikkaa. {}:tä käytetään sangen usein tähän tehtävään, mutta halutetessaan voi käyttää vaikkapa å:ta. Nämä merkit kannattaa laittaa yksinkertaisiin lainausmerkkeihin (&amp;#039;), mikäli ne ovat [[komentotulkki|komentotulkin]] käyttämiä erikoismerkkejä.&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;Tässä luodaan väärinpäin tulostetun tiedoston valilyonnit.txt jokaisesta rivistä samanniminen tiedosto, joka sisältää 2 Mt satunnaista dataa. Apuna käytetään valitsinta &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;, jolle annetaan argumenttina se merkki tai merkkijono, jota käytetään merkitsemään vastaanottavan ohjelman argumentin paikkaa. {}:tä käytetään sangen usein tähän tehtävään, mutta halutetessaan voi käyttää vaikkapa å:ta. Nämä merkit kannattaa laittaa yksinkertaisiin lainausmerkkeihin (&amp;#039;), mikäli ne ovat [[komentotulkki|komentotulkin]] käyttämiä erikoismerkkejä.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Välilyöntien ja erikoismerkkien ongelmaa voi yrittää ratkaista myös valitsimella &amp;lt;tt&amp;gt;-0&amp;lt;/tt&amp;gt;, joka määrittää syötettävien merkkijonojen rajaksi nollamerkin normaalien välilyönnin tai rivinvaihdon sijaan. Tälle sopivaa tulostetta tuottaa ainakin [[find]] valitsimella &amp;lt;tt&amp;gt;-print0&amp;lt;/tt&amp;gt;. Esimerkiksi&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; find -lname &#039;*s*&#039; -print0|xargs -0 [[file]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;näyttäisi nykyisen hakemiston ja sen alihakemistojen sisältämien [[symbolinen linkki|symbolisten linkkien]] joiden nimessä on s-kirjain, kohdetiedostot.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Valitsimella &amp;lt;tt&amp;gt;-d&amp;lt;/tt&amp;gt; voidaan määritellä syötettävien merkkijonojen rajaksi vapaavalinteinen yhden tavun mittainen merkki (esimerkiksi [[Unicode]]-ä ei siis käy). Valitsimella &amp;lt;tt&amp;gt;-a&amp;lt;/tt&amp;gt; voidaan suoraan valita xargsin syötteeksi annettava tiedosto. Esimerkiksi komento&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; xargs -d w -a t.txt [[touch]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Loisi touchin avulla tiedostot b.txt n.txt ja m.txt, kun tiedoston t.txt sisältönä on&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&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: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; b.txtwn.txtwm.txtw&lt;/ins&gt;&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 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;== Katso myös ==&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;== Katso myös ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pb</name></author>
	</entry>
	<entry>
		<id>https://www.linux.fi/w/index.php?title=Xargs&amp;diff=15918&amp;oldid=prev</id>
		<title>Pb: alkua</title>
		<link rel="alternate" type="text/html" href="https://www.linux.fi/w/index.php?title=Xargs&amp;diff=15918&amp;oldid=prev"/>
		<updated>2007-06-23T18:22:04Z</updated>

		<summary type="html">&lt;p&gt;alkua&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Uusi sivu&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Xargs-[[komentorivi|komentorivityökalu]] mahdollistaa [[STDIN]]:in kautta sille syötettävän tekstin antamisen riveittäin tai sanoittain toiselle ohjelmalle argumentiksi. Esimerkiksi komento&lt;br /&gt;
 [[ls]] kjk*|xargs [[rm]]&lt;br /&gt;
poistaisi kaikki ls:n listaamat kjk-alkuiset tiedostot. Pelkkä&lt;br /&gt;
 ls kjk*|rm&lt;br /&gt;
ei toimi, sillä tässä koko ls:n tuloste putkitetaan rm:lle yhtenä klönttinä, mitä rm ei ymmärrä.&lt;br /&gt;
&lt;br /&gt;
Syötettävillä riveillä on usein välilyöntejä ja muita erikoismerkkejä, joita vastaanottava ohjelma ei useinkaan ymmärrä sinällään. Vastaanottava ohjelma saattaa myös haluta syötteen joksikin muuksi kuin viimeiseksi argumentikseen. Tällöin on yhtenä ratkaisuna käyttää seuraavan komennon kaltaista syntaksia:&lt;br /&gt;
 [[tac]] valilyonnit.txt|xargs -I&amp;#039;{}&amp;#039; [[dd]] if=/dev/urandom of=&amp;#039;{}&amp;#039; bs=1024 count=2048&lt;br /&gt;
Tässä luodaan väärinpäin tulostetun tiedoston valilyonnit.txt jokaisesta rivistä samanniminen tiedosto, joka sisältää 2 Mt satunnaista dataa. Apuna käytetään valitsinta &amp;lt;tt&amp;gt;-I&amp;lt;/tt&amp;gt;, jolle annetaan argumenttina se merkki tai merkkijono, jota käytetään merkitsemään vastaanottavan ohjelman argumentin paikkaa. {}:tä käytetään sangen usein tähän tehtävään, mutta halutetessaan voi käyttää vaikkapa å:ta. Nämä merkit kannattaa laittaa yksinkertaisiin lainausmerkkeihin (&amp;#039;), mikäli ne ovat [[komentotulkki|komentotulkin]] käyttämiä erikoismerkkejä.&lt;br /&gt;
&lt;br /&gt;
== Katso myös ==&lt;br /&gt;
*[[Find]]&lt;br /&gt;
&lt;br /&gt;
[[Luokka:Komentorivin perustyökalut]]&lt;/div&gt;</summary>
		<author><name>Pb</name></author>
	</entry>
</feed>