sed '1,/target_string/d' file1 : till the ened of the file sed -n 's/pattern//p' filename just matching pattern, like grep