How to open a huge text file?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to open a huge text file?
# 1  
Old 12-26-2011
How to open a huge text file?

Hi.

I have a 10 Gb text file.the default text editor in ubuntu doens't open it.

Does anyone know how can i open it??

Thanks
# 2  
Old 12-26-2011
USe split command and split the files....
Quote:
split -l 10000 abc.txt
---------- Post updated at 01:36 PM ---------- Previous update was at 01:35 PM ----------

Check the space availability before you do this....... U can also split size wise...rather than line-wise
# 3  
Old 12-26-2011
If you just want to view the content, use "less". You can also use head and tail to view part of the file from the beginning or end. To change a small portion without changing the size (no insertion, deletion) you can use a hex-editor or dd to do it efficiently.
# 4  
Old 12-26-2011
The question is: what do you want to do?

No editor will handle that file efficiently and most won't even open it. That means you have to use a lot of unix command line tools, so we need to tell you which tools to use.

But if we do not understand what AND WHY you are going to "edit" in the big file, we cannot help you.
# 5  
Old 12-26-2011
In windows, there is a tool called edit pad pro that I have used to open some very large text files. I don't know if that is available for linux or not.

I agree with jim mcnamara in that it would be helpful if you specified more than just the need to open the file. It's not like you will be able to scroll through a file like that and see much, unless you have a few years with nothing to do. If you want to search the file, something like grep will find things and print the entire line where your search text was found. Tools like sed would let you edit the text, but that would be slow since you would be creating a new copy of the entire file, etc. Languages like perl provide more advanced functionality, etc.

LMHmedchem
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Filter records in a huge text file from a filter text file

Hi Folks, I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file. bash scripting is what i need. Data.txt Name OrderID Quantity Sam 123 300 Jay 342 498 Kev 78 2500 Sam 420 50 Vic 10... (3 Replies)
Discussion started by: tech_frk
3 Replies

2. UNIX for Dummies Questions & Answers

how to open the linux text file in windows

Hi friends, help me i downloaded some file from the Linux and i copied it to windows.Now i am unable to open those file. please help me how to open those file. the files are something like test.tcl note.tcl Thanking you Praveen (2 Replies)
Discussion started by: prakumar
2 Replies

3. Shell Programming and Scripting

Output only first 400 bytes of a huge text file

How do I output only the first 400 bytes of a huge text file to a new file. It has to be unmodified so no added invisible characters. Many thanks..... (3 Replies)
Discussion started by: garethsays
3 Replies

4. Shell Programming and Scripting

Open the file and edit/append the text

Hi i have a file like this mailboxnum 20 filename <to subsitute> fileloaction /home/dd234/ filetype txt in a directory i have set of files for ex: TT45.1.2 TT45.1.3 TT45.1.4 . . in for loop i have to take this files and subsitute one by one ex: (1 Reply)
Discussion started by: greenworld123
1 Replies

5. Shell Programming and Scripting

Replacing in huge text file

I have huge text files (~120 MB)x100 which equivalents to ~11GB of data. The files contain pure numbers, actually the value of "phi" to 10 billion digits!! I know its huge!! Here are the last few lines of a file 0952899155 3233967444 3344925499 0276061529 7261968933 9683989044 3317145063... (14 Replies)
Discussion started by: shantanuthatte
14 Replies

6. UNIX Desktop Questions & Answers

cannot open text file

Hi I am a new to linux, I was faced a file to know is a text file but its type isn't text document and I cannot open it, please guide me. Regards. (2 Replies)
Discussion started by: mkhorami76
2 Replies

7. UNIX for Dummies Questions & Answers

How to examine and open a text file?

Hi I am a new to linux, i was faced a file to know is a text file but its type isnt text document and i can not open it please guide me. Regards ---------- Post updated at 02:52 AM ---------- Previous update was at 02:40 AM ---------- Thank you for your cooperation, my OS is a centOS 5.5... (1 Reply)
Discussion started by: mkhorami76
1 Replies

8. UNIX for Dummies Questions & Answers

How to remove FIRST Line of huge text file on Solaris

i need help..!!!! i have one big text file estimate data file size 50 - 100GB with 70 Mega Rows. on OS SUN Solaris version 8 How i can remove first line of the text file. Please suggest me for solutions. Thank you very much in advance:) (5 Replies)
Discussion started by: madoatz
5 Replies

9. UNIX for Dummies Questions & Answers

how to open a text file using some tool such as gedit under gtk

how to open a text file using some tool such as gedit under gtk I list some text file names in a GtkCList . I want to open the file on when users click on the row. How to implement this ? Thanks (0 Replies)
Discussion started by: cy163
0 Replies

10. UNIX for Dummies Questions & Answers

how to open a text file by double clicking on the file name in gtk+

how to open a text file by double clicking on the file name shown in a label widget in gtk+. thanks (0 Replies)
Discussion started by: cy163
0 Replies
Login or Register to Ask a Question