This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: -exec on find(1) broken
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Marty Leisner on 10/10/2007 12:10 AM:
>
> Geez, thanks Brian...I've been using find for 25 years and never realized it had
> a delete option .
That's because, until a few years ago, it didn't (and it is still only GNU
find that has it; don't try using it in a POSIX-compliant script).
> I often used -exec with cp/mv -- but coreutils has an option (-t) so you
> can put these after xargs...
Or, if you are worried about POSIX portability (since mv -t is also a GNU
extension), you could do things like this to still get the target
directory in the last location:
find ... -exec -c 'mv "$@" target' sh {} +
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----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
iD8DBQFHDMCI84KuGfSFAYARAk5RAKCyPpLDo+LZEufjgALwNCo+R09KdgCgjUH/
HlOXOyktdQLjeYwnCGmXjdk=
=aJLJ
-----END PGP SIGNATURE-----
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/