Date: Thu, 29 May 2008 02:01:06 GMT From: "Michael A. Smith" <michael@smith-li.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/124084: find -execdir does not prepend ./ to filenames, causing problems for certain files. Message-ID: <200805290201.m4T216HN024481@www.freebsd.org> Resent-Message-ID: <200805290210.m4T2A1o4025306@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 124084
>Category: bin
>Synopsis: find -execdir does not prepend ./ to filenames, causing problems for certain files.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu May 29 02:10:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Michael A. Smith
>Release: 7.0
>Organization:
>Environment:
>Description:
freebsd find's implementation of -execdir fails for filenames that might be mistaken for arguments.
>How-To-Repeat:
The classic example is a filename starting with a dash.
$ mkdir /tmp/test
$ cd /tmp/test
$ >"-foo"
$ find . -type f -execdir rm {} \;
rm: illegal option -- o
usage: rm [-f | -i] [-dPRrvW] file ...
unlink file
>Fix:
The easiest solution is to patch find to prepend ./ to each filename.
>Release-Note:
>Audit-Trail:
>Unformatted:
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805290201.m4T216HN024481>
