Хотите сделать посильный вклад в развитие Ubuntu и русскоязычного сообщества? Помогите нам с документацией!
0 Пользователей и 1 Гость просматривают эту тему.
find dir/with/structure -type f \! -exec bash -c "echo '{}' | grep -qFf exception.list " \; -print
find . -name "*.log" -type f \! -exec bash -c "echo '{}' | grep -f ~/exclusions.txt" \; -print
find dir/with/structure -type f -print0 | grep -aZzvFf exception.list | xargs -0 echo rm
Код: (bash) [Выделить]find dir/with/structure -type f -print0 | grep -aZzvFf exception.list | xargs -0 echo rmНу или если есть возможность|желание потеститьКод: (bash) [Выделить]find dir/with/structure -type f \! -exec bash -c "echo '{}' | grep -qFf exception.list " \; -printЕсли будет выводить правильно -print заменить на -delete
Подскажите а папки с пробелами в файл exception.list как заносить ?
find dir/with/structure -type f | grep 'Иванов И\.И\.'
egrep "Иванов И\.И\."
$: cat test.txtИванов И.И.Петров П.П.$: cat test.txt | grep 'ов 'Иванов И.И.
file test.txttest.txt: Unicode text, UTF-8 text
Страница сгенерирована за 0.045 секунд. Запросов: 22.