I want to add some text to over 200,000 files I am trying this
find . -name *.txt -print | xargs -I % echo "hello world" >> %
But nothing is happening. When i run find . -name *.txt it work by itself as does echo "hello world" >> myfile.txt
|
The shell is expanding the If you need to do shell redirections, you'll have to try something like this:
How it works:
Alternatively, you could use a command such as
References: |
|||||||||
|
|
With GNU Parallel you can do:
You can install GNU Parallel simply by:
Watch the intro videos for GNU Parallel to learn more: https://www.youtube.com/playlist?list=PL284C9FF2488BC6D1 |
|||
|
|
>> %part, not xargs. Did it create a file called%? – Mikel May 3 '12 at 3:37