Remove all lines before a match with sed March 4, 2023 by Tarik try this (GNU sed only): sed '0,/^bin$/d' ..output is: $sed '0,/^bin$/d' file boot ... sys tmp usr var vmlinuz