0

Is there any way to check how many rows are in an SQL dump file? I have a large 32GB dump, and wanted to check how many rows are in the file.

I am using a windows machine with a MySQL server,

Thanks!

1 Answer 1

1
  • You should be safely calculate using wc -l filename.sql

  • On windows you may use following in command prompt: findstr /R /N "^" filename.sql | find /C ":"

As such not a part of question but out of intereset, you can also list content of the 32G dump using mysqldumpsplitter: mysqldumpsplitter.sh --source filename --desc [More how-tos]

3
  • I am in a windows environment and not a *nix, does this exist in the windows world? Thanks for the comment
    – Kyle
    Commented Oct 15, 2015 at 17:46
  • findstr /R /N "^" filename.sql | find /C ":" Updated answer above... Why would you want a line count though?
    – mysql_user
    Commented Oct 15, 2015 at 17:48
  • 1
    You could use cygwin - a load of deadly unix utilities for Windows.
    – Vérace
    Commented Oct 15, 2015 at 18:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.