On Fri, February 24, 2012 00:06, Philipp Thomas wrote:
On Thu, 23 Feb 2012 09:20:00 +0100, "Christian Brabandt"
Reicht Dir Posix? http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html
Das ist ein Eigentor :)
???
Ich zitiere aus besagter Seite:
If the primary expression is punctuated by a <plus-sign>, the primary shall always evaluate as true, and the pathnames for which the primary is evaluated shall be aggregated into sets.
Danach dürfte find nur bei "-exec {} + " die Argumente zu Gruppen zusammenfassen, nicht aber bei {} \;
Richtig und ich habe doch auch nur find -exec {} + erwähnt. Ich verstehe nicht, was du mir sagen willst. So steht es doch auch in der Manpage von GNU find.
Wie sieht das bei BSD find aus?
Ich hab wie gesagt keinen Zugriff mehr auf Non-GNU Systeme, daher hier nur kopiert von der Website¹ http://www.freebsd.org/cgi/man.cgi?query=find ,---- | -exec utility [argument ...] ; | | True if the program named utility returns a zero value as its | exit status. Optional arguments may be passed to the utility. | The expression must be terminated by a semicolon (``;''). If you | invoke find from a shell you may need to quote the semicolon if | the shell would otherwise treat it as a control operator.If the | string ``{}'' appears anywhere in the utility name or the argu- | ments it is replaced by the pathname of the current file. | Utility will be executed from the directory from which find was | executed. Utility and arguments are not subject to the further | expansion of shell patterns and constructs. | | -exec utility [argument ...] {} + | | Same as -exec, except that ``{}'' is replaced with as many path- | names as possible for each invocation of utility. This behaviour | is similar to that of xargs(1). `---- ¹) Interessant daran ist, man kann für verschiedene Distributionen die manpage abrufen. Die erste Erwähnung von find -exec + war HP-UX 11.00 (laut Wikipedia von 1997), in FreeBSD seit Version 5 (Datum der Manpage: May 2001) als auch in SunOS 5.9 (Juni 2001), wohin gegen es bei OpenBSD 5 noch nicht enthalten ist. In dem Zusammenhang ist die Seite von Sven Mascheck ganz interessant, der Eigenheiten verschiedener Shells und Unixe dokumentiert, hier über find -exec +: http://www.in-ulm.de/~mascheck/various/find/#xargs Anscheinend rührt es von SVR4 (1988!) her (wo es nicht dokumentiert war). Grüße, Christian -- Um die Liste abzubestellen, schicken Sie eine Mail an: opensuse-de+unsubscribe@opensuse.org Um den Listen Administrator zu erreichen, schicken Sie eine Mail an: opensuse-de+owner@opensuse.org