Skip to main content

Get first part of file, until 'splitword'

Find first occurence of 'splitword' in file:

grep -n "splitword" bigdumpfile.sql | head -1 | cut -d : -f 1

Result is: 86948

Save partial dump:

sed -n 1,86948p bigdumpfile.sql > reduced_dumpfile.sql