URL:
<https://savannah.gnu.org/bugs/?54860>
Summary: Less performance of -execdir echo {} +
Project: findutils
Submitted by: ahmad_elkomey
Submitted on: Wed 17 Oct 2018 10:31:41 PM UTC
Category: find
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: None
Fixed Release: None
_______________________________________________________
Details:
I have this directory structure with some trivial files
.
├── dir
│ ├── bar.c
│ └── one.c
├── dir-2
│ ├── another.c
│ ├── dir-4
│ │ └── file
│ ├── dir-5
│ │ └── file
│ ├── file
│ └── foo.c
├── dir-3
│ ├── dir-4
│ │ └── file
│ ├── dir-5
│ │ └── file
│ └── file
└── file
7 directories, 11 files
Running the command:
find -iname "*c" -exec echo '{}' +
returns
./dir-2/foo.c ./dir-2/another.c ./dir/bar.c ./dir/one.c
which is as expected.
But when I run:
find -iname "*c" -execdir echo '{}' +
it returns
./foo.c
./another.c
./bar.c ./one.c
And I was expecting
./foo.c ./another.c
./bar.c ./one.c
I'm using find (GNU findutils) 4.7.0-git
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54860>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/