bin/124084: find -execdir does not prepend ./ to filenames,
causing problems for certain files.
Michael A. Smith
michael at smith-li.com
Thu May 29 02:10:01 UTC 2008
>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:
More information about the freebsd-bugs
mailing list