I need to remove from file data.txt , all rows having "# john" . I can load the file in array because it's a very big file and I receive a memory error.Is there any way to remove all rows having "# john" in the file , without loading the file in array ?

Thank youGraziano

cpradio
—
2013-09-24T13:08:40Z —
#2

You will want to use fgets, write lines you want to keep to a new file, something like the below