delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/05/23:12:45

X-Spam-Check-By: sourceware.org
Date: Tue, 05 Dec 2006 20:12:13 -0800
From: David Rothenberger <daveroth AT acm DOT org>
Subject: find -execdir command executed in wrong directory
To: cygwin <cygwin AT cygwin DOT com>
Message-id: <4576431D.7060803@acm.org>
MIME-version: 1.0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.8) Gecko/20061025 Thunderbird/1.5.0.8 Mnenhy/0.7.4.666
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: SHA256

"find -execdir" seems to be executing the command in the wrong
directory. If the file is in /tmp/a/b/c, the command is executed with
the current directory /tmp/a/b instead of /tmp/a/b/c. oldfind does the
right thing.

% cygcheck -cd findutils
Cygwin Package Information
Package              Version
findutils            4.3.2-1

% mkdir -p /tmp/findtest/a/b/{c,d}
% touch /tmp/findtest/a/b/{c,d}/somefile

% find /tmp/findtest/a -type f -print -execdir pwd {} +
/tmp/findtest/a/b/c/somefile
pwd: ignoring non-option arguments
/tmp/findtest/a/b
/tmp/findtest/a/b/d/somefile
pwd: ignoring non-option arguments
/tmp/findtest/a/b

% oldfind /tmp/findtest/a -type f -print -execdir pwd {} +
/tmp/findtest/a/b/c/somefile
pwd: ignoring non-option arguments
/tmp/findtest/a/b/c
/tmp/findtest/a/b/d/somefile
pwd: ignoring non-option arguments
/tmp/findtest/a/b/d


- --
David Rothenberger                spammer? -> spam AT daveroth DOT dyndns DOT org
GPG/PGP: 0x92D68FD8, DB7C 5146 1AB0 483A 9D27 DFBA FBB9 E328 92D6 8FD8

Pauca sed matura.
        [Few but excellent.]
                -- Gauss
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBRXZDHb3xOW8bc2dhAQhkqgf/UUCmMbEz5MPEDY/ZOOO2jQsTrzlODHkL
32XEAVFPPmCGK/c5B4jzppATi4rhmybiVYe8aGY1XrOdZSykhQ7ZVmJiCVEHTYUC
C7tpfv+wB7HHGK6AdPZiIv3x87/HFx8/jWUkRQYrqms2pRZvEyPUkhW5BTQjCFE9
ZmDY/ZTsZ+SapG1jUF61JBUwdEr0bIIyR4hNoblchIEetHaT994HlrMT7l2p8Fil
7rEPK8KqAPq+1tvWnAPRD9JKZt8Gw0WGclUX14uDwzbd1HDyD79y3Tlnkp+TVVbm
2p0f/FSd5/dmmb7EMrX/f8upF8O3zjycnozib9/cnTKaDI00Esa2Kw==
=u8xf
-----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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019