LINUX.ORG.RU

не BAG ли


0

0
$ mkdir testfind
$ touch testfind/test.orig
$ touch testfind/test.or~
$ dir testfind
test.or~ test.orig
$ find testfind -name "*.orig" -o -name "*~"
testfind/test.orig
testfind/test.or~
$ find testfind -name "*.orig" -o -name "*~" -exec rm -rf {} \;
$ dir test
findtest.orig Почему остался этот файл????????
★★
нет, не баг. man find.
The string `{}' is replaced by the current file name being processed
                                   !!!!!!!
sasha999 ★★★★
()
find testfind \( -name "*.orig" -o -name "*~" \) -exec rm -rf {} \;

без скобок exec относился только к последнему условию

jackLucas
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.