I've tried this:
find / -type f -iname "*.txt" 2> /dev/null | xargs grep --ignore-case mypattern
Then I tried first redirecting the find results into a file and running:
xargs -a /tmp/findtext.txt grep --ignore-case mypattern
It constantly gives me: (excuse the Dutch)
Code:
xargs: Ongepaard enkel aanhalingsteken; aanhalingstekens worden door 'xargs'
speciaal behandeld tenzij u optie '-0' gebruikt.
grep: /home/user/[: Bestand of map bestaat niet
grep: www.Speed.Cd: Bestand of map bestaat niet
grep: ]: Bestand of map bestaat niet
grep: 'lseek' is mislukt: Ongeldige 'seek'-opdracht
grep: Mr.Freedom.1969.ECLiPSE.DVDRiP.XViD.iNT-DeBTXViD/www.Speed.Cd.txt: Bestand of map bestaat niet
grep: /home/user/Bureaublad/JonasMap/verslag/Castles: Bestand of map bestaat niet
[etc. etc.]
("Bestand bestaat niet" = "File doesn't exist"
Start says: "unpaired single quote; quotes are treated special, unless you pass the '-0' option"
)
The start of the search results look like this:
Code:
/tmp/findtext.txt
/etc/X11/rgb.txt
/home/user/[ www.Speed.Cd ] - Mr.Freedom.1969.ECLiPSE.DVDRiP.XViD.iNT-DeBTXViD/www.Speed.Cd.txt
/home/user/.TeXworks/configuration/auto-indent-patterns.txt
/home/user/.TeXworks/configuration/smart-quotes-modes.txt
/home/user/.TeXworks/configuration/syntax-patterns.txt
/home/user/.TeXworks/configuration/tag-patterns.txt
/home/user/.TeXworks/configuration/texworks-config.txt
/home/user/.TeXworks/configuration/delimiter-pairs.txt
/home/user/.TeXworks/completion/tw-basic.txt
What is the correct command line to use? Google isn't very helpful. Now that I take a closer look at it, it actually seems to process some files.