-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to [EMAIL PROTECTED] on 7/12/2007 2:26 AM: > Hello, > > I like to get help with an usage problem concerning > find | xargs (findutils-4.2.20-2) > under windows 2000 command shell.
Consider upgrading your installation. The latest stable version of findutils is 4.2.31, and cygwin ships with findutils 4.3.8. Besides, 4.2.20 has a known security bug. > > The command > find ./ -name *.h | xargs -n1 echo > produces the error message > �find: write error: Invalid argument� Not a bug in find, but a problem in your use (or lack thereof) of shell quoting. You meant: find ./ -name '*.h' | xargs -n1 echo or more compactly (since . is implied if no directory is given, -print is implied if no action is given, and xargs defaults to echo, and find already outputs one file per line) and more secure (in the case of malicious file names, although -print0 gives even more security for file systems that support \n in file names): find -name '*.h' > The same command line works in the Cygwin bash shell. > It seems that �find� stuck if the pipe buffer gets full. OK, this part of the report is not a findutils question - it is a cmd.com question, so you should ask on a Windows-related mailing list where someone can tell you how to work around Microsoft's puny shell limitations (and if you ask on the cygwin list, the answer will likely be "use the bash shell if it works and cmd.com doesn't") - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlvZo84KuGfSFAYARAq8VAJ0RtgydgDytV12H/Ir4bh4dgR9+XgCgr8F4 IeAg5ID39tREasnX6ENToQ0= =Di8j -----END PGP SIGNATURE----- _______________________________________________ Bug-findutils mailing list Bug-findutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-findutils