Libervis Network - For a Free WorldLibervis Projects | Nuxified Projects
Welcome guest. Register | Login | Show what's new

Slicing big files

Slicing big files

I have an SQL file that is more than 50 MB big and that is just too big to open all at once in any text editor, at least on my computer which has only 256MB RAM.

So I'm looking for a way to slice this file into pieces and then opening it piece by piece in order to find what I'm looking for in it (I don't need a whole file).

Is that possible and how?

Thanks alot.

__________________

Let's not fear freedom.


for splitting up text

for splitting up text files, you could try combinations of head and tail, but can't you use grep for finding ?

I can use grep, but in this

I can use grep, but in this case it is not sufficient because grep will spew a load of lines containing a term which is mentioned all over the file, so it's not very precise.

Anyway, I'll try those, thanks. Smiling

__________________

Let's not fear freedom.

How about the very

How about the very obviously named split command?

__________________

CAN I HAS FIXD CAPSLOK KEE PLZ?

Hehe you're right. Split

Hehe you're right. Split does exactly what I need.

Here's the command I used: split -C 1500000 file.txt. The -C 1500000 part means that it will split the file into 1 500 000 line bytes.

Thanks

__________________

Let's not fear freedom.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

We have 2328 members who wrote 2044 articles and 11847 comments. Welcome to our newest member, hutopire!

Who's online

There are currently 0 users and 4 guests online.
Nuxified RSS feed