1) -exec command ;
2) -exec command {} +
Both are different.
Let say you have 3 files, a b c in the directory.
#find . -exec echo '{}' >> tmp1 \;
output in tmp1 will be :
.
./b
./a
./c
./tmp1
#find . -exec echo '{}' >> tmp2 \+;
output in tmp2 will be :
a b c
with + all matched file will be append and execute once.
with ; all matched file will be execute for each matching.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น