21 How to search all tree and find file with specific name and then delete lines from this file that starts with #?

the -I {} is the marker, which says the file name is {}

find . -type f -name INPUT.txt -print0 | xargs -0 -I {}  sed -i.bak '/^#/d' {}
 

The above could also be done like this

find . -type f -name INPUT.txt -print0 | xargs -0 sed -i.bak '/^#/d'
 

But I found using explicit marker for the argument more clear. This is useful. If using a command that needs more than one argument, the marker is needed anyway, so might as well get used to using it. Marker can be anything. So this works also

find . -type f -name INPUT.txt -print0 | xargs -0 -I file  sed -i.bak '/^#/d' file