X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: <470CC08B.2060505@byu.net> Date: Wed, 10 Oct 2007 06:07:39 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com, leisner AT rochester DOT rr DOT com Subject: Re: -exec on find(1) broken References: <470B1B1B DOT 2060404 AT columbus DOT rr DOT com> <20071009062547 DOT GA19172 AT suncomp1 DOT spk DOT agilent DOT com> <470B22FF DOT 10107 AT columbus DOT rr DOT com> <470B288E DOT 8060504 AT columbus DOT rr DOT com> <470B4F1B DOT 3AD3BCB8 AT dessent DOT net> <200710100610 DOT l9A6ADDk029020 AT dell2 DOT home> In-Reply-To: <200710100610.l9A6ADDk029020@dell2.home> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com -----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 AT byu DOT 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/