How to run sed on over 10 million files in a directory?
- by Sandro
I have a directory that has 10144911 files in it. So far I've tried the following:
for f in ls; do sed -i -e 's/blah/blee/g' $f; done
Crashed my shell, the ls is in a tilda but i can't figure out how to make one.
ls | xargs -0 sed -i -e 's/blah/blee/g'
Too many args for sed
find . -name "*.txt" -exec sed -i -e 's/blah/blee/g' {} \;
…