[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #30777] using "-exec {} +" syntax silently gobbles excess strings
From: |
Mike Frysinger |
Subject: |
[bug #30777] using "-exec {} +" syntax silently gobbles excess strings |
Date: |
Sun, 15 Aug 2010 05:11:57 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100809 Gentoo Firefox/3.6.8 |
URL:
<http://savannah.gnu.org/bugs/?30777>
Summary: using "-exec {} +" syntax silently gobbles excess
strings
Project: findutils
Submitted by: vapier
Submitted on: Sun 15 Aug 2010 05:11:56 AM GMT
Category: find
Severity: 3 - Normal
Item Group: Wrong result
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.5.9
Fixed Release: None
_______________________________________________________
Details:
setup:
mkdir foo
cd foo
touch a b c
then run:
find -type f -exec echo /usr/{} \;
and get back:
/usr/./a /usr/./b /usr/./c
now change the \; to a +:
find -type f -exec echo /usr/{} +
and you get back the odd output:
./a ./b ./c
personally, i think treating it a bit more intelligently and getting the same
output as in the first `find` would be nice, but if you dont want to support
that, `find` at least should be issuing a warning/error here.
otherwise something innocent like:
# use current file list to delete files in another dir
find . -type f -exec rm /some/other/path/{} \;
can easily & silently turn foul when doing:
find . -type f -exec rm /some/other/path/{} +
all the files in $PWD get deleted instead of /some/other/path/
tested with version 4.4.2, 4.5.8, and current git
(c530d90990ca81dfca254bbca18ab9e7273b4585) -- same behavior
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?30777>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #30777] using "-exec {} +" syntax silently gobbles excess strings,
Mike Frysinger <=