bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-execdir '{}' \; vs -execdir '{}' +


From: Андрей Веселов
Subject: -execdir '{}' \; vs -execdir '{}' +
Date: Sat, 03 Feb 2018 13:43:09 +0300

# cd test
# ls -1
file1
file2
file3
# find . -type f -exec echo -n '{}' +
./file1 ./file3 ./file2
# find . -type f -exec echo -n '{}' \;
./file1./file3./file2
# find . -type f -execdir echo -n '{}' +
./file1./file3./file2
# find . -type f -execdir echo -n '{}' \;
./file1./file3./file2

It's seems that with -execdir '+' is the same as ';' and a command run once for 
each file. strace output gives the same conclusion.

# find --version
find (GNU findutils) 4.4.2
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Built using GNU gnulib version e5573b1bad88bfabcda181b9e0125fb0c52b7d3b
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS() 
CBO(level=0)

# uname -a
Linux s9ffd145e 2.6.32-042stab126.2 #1 SMP Thu Jan 4 16:41:44 MSK 2018 x86_64 
GNU/Linux

reply via email to

[Prev in Thread] Current Thread [Next in Thread]