How do i open a file larger than available memory in visual studio?

62 views Asked by At

In my pre-windows days, i recall using a hex editor that only loaded in the part of the file i was working on. I need to load a file that is larger than available memory into visual studio to search for a string ( it's a 28GB MySQL dump file and i only have 8GB of RAM ). Is this possible in visual studio 2019 ? Windows 10 search finds nothing - it seems to ignore large files.

1

There are 1 answers

4
jakub podhaisky On

To my knowledge there is no way to open this in VisualStudio If you only need to search for string you do not need to open the file at all you can use comand prompt:

findstr /C:"yourSearchString" "C:\path\to\your\file.sql"

if you want to open the file in some editor I know that [EmEditor][1] is capable

Also you can use [WSL][2] to split the fine into smaller sections:

split -b 1G "your_large_file.sql" "part_"

as @ user20716902 mentioned it would be advised to use

strings "C:\path\to\your\file.sql" | find "yourSearchString"

because findstr could get line is too long error because the format of the file [1]: https://www.emeditor.com [2]: https://learn.microsoft.com/en-us/windows/wsl/