How to remove pdf files which either don’t contain a string in their searcheable pages, or can’t be opened?

I am searching for pdf files in a directory that contain a string, by pdfgrep -R -i “flask”(or pdftotext and grep). There are some files not openable or some pages of them are not: pdfgrep: Could not open pdf/19234816.pdf pdfgrep: Could not search in page 261 of pdf/97239040.pdf I was wondering how to remove pdf…

Details

Does ext3grep work on ext4?

Does ext3grep work on ext4? It is recommended in https://unix.stackexchange.com/a/237142/674 and https://askubuntu.com/a/217632/. In the first link, its option to specify the time window of deletion by –after and –before seems useful to screen out a lot of nontarget files. ext3grep /dev/sda3 –restore-all –after date -d ‘2015-01-01 00:00:00’ ‘+%s’ –before `date -d ‘2015-01-02 00:00:00’ ‘+%s’ Does…

Details