<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Another Useful Copy Command</title>
	<link>http://bimma.me.uk/2010/05/08/another-useful-copy-command/</link>
	<description>Oh... Linux (Xubuntu) Cars, Computers &#038; Stuff</description>
	<pubDate>Sun, 20 May 2012 16:06:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: bimma</title>
		<link>http://bimma.me.uk/2010/05/08/another-useful-copy-command/#comment-10268</link>
		<author>bimma</author>
		<pubDate>Sun, 06 Jun 2010 08:27:18 +0000</pubDate>
		<guid>http://bimma.me.uk/2010/05/08/another-useful-copy-command/#comment-10268</guid>
		<description>@ Ozzyprv

From the find man pages:

-exec command {} +
              This  variant  of the -exec action runs the specified command on
              the selected files, but the command line is built  by  appending
              each  selected file name at the end; the total number of invoca‐
              tions of the command will  be  much  less  than  the  number  of
              matched  files.   The command line is built in much the same way
              that xargs builds its command lines.  Only one instance of  `{}'
              is  allowed  within the command.  The command is executed in the
              starting directory.
EXAMPLES
       find /tmp -name core -type f -print &#124; xargs /bin/rm -f

       Find  files  named core in or below the directory /tmp and delete them.
       Note that this will work incorrectly if there are  any  filenames  con‐
       taining newlines, single or double quotes, or spaces.

       find /tmp -name core -type f -print0 &#124; xargs -0 /bin/rm -f

       Find  files  named core in or below the directory /tmp and delete them,
       processing filenames in such a way that file or  directory  names  con‐
       taining  single or double quotes, spaces or newlines are correctly han‐
       dled.  The -name test comes before the -type test  in  order  to  avoid
       having to call stat(2) on every file.

       find . -type f -exec file '{}' \;

       Runs  `file'  on  every file in or below the current directory.  Notice
       that the braces are enclosed in single quote marks to protect them from
       interpretation as shell script punctuation.  The semicolon is similarly
       protected by the use of a backslash, though single  quotes  could  have
       been used in that case also.</description>
		<content:encoded><![CDATA[<p>@ Ozzyprv</p>
<p>From the find man pages:</p>
<p>-exec command {} +<br />
              This  variant  of the -exec action runs the specified command on<br />
              the selected files, but the command line is built  by  appending<br />
              each  selected file name at the end; the total number of invoca‐<br />
              tions of the command will  be  much  less  than  the  number  of<br />
              matched  files.   The command line is built in much the same way<br />
              that xargs builds its command lines.  Only one instance of  `{}&#8217;<br />
              is  allowed  within the command.  The command is executed in the<br />
              starting directory.<br />
EXAMPLES<br />
       find /tmp -name core -type f -print | xargs /bin/rm -f</p>
<p>       Find  files  named core in or below the directory /tmp and delete them.<br />
       Note that this will work incorrectly if there are  any  filenames  con‐<br />
       taining newlines, single or double quotes, or spaces.</p>
<p>       find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f</p>
<p>       Find  files  named core in or below the directory /tmp and delete them,<br />
       processing filenames in such a way that file or  directory  names  con‐<br />
       taining  single or double quotes, spaces or newlines are correctly han‐<br />
       dled.  The -name test comes before the -type test  in  order  to  avoid<br />
       having to call stat(2) on every file.</p>
<p>       find . -type f -exec file &#8216;{}&#8217; \;</p>
<p>       Runs  `file&#8217;  on  every file in or below the current directory.  Notice<br />
       that the braces are enclosed in single quote marks to protect them from<br />
       interpretation as shell script punctuation.  The semicolon is similarly<br />
       protected by the use of a backslash, though single  quotes  could  have<br />
       been used in that case also.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ozzyprv</title>
		<link>http://bimma.me.uk/2010/05/08/another-useful-copy-command/#comment-10260</link>
		<author>Ozzyprv</author>
		<pubDate>Sun, 06 Jun 2010 01:52:40 +0000</pubDate>
		<guid>http://bimma.me.uk/2010/05/08/another-useful-copy-command/#comment-10260</guid>
		<description>how does the magic of the {} work?
thank you!
o.</description>
		<content:encoded><![CDATA[<p>how does the magic of the {} work?<br />
thank you!<br />
o.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

