Trying To Split a Large File


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Trying To Split a Large File
# 1  
Old 02-15-2019
Trying To Split a Large File

Trying to split a 35gb file into 1000mb parts. My research shows I should you this.
Code:
 split -b 1000m file.txt

and my return is "split: cannot open 'crunch1.txt' for reading: No such file or directory" so I tried
Code:
split -b 1000m Documents/Wordlists/file.txt

and I get nothing other than the curser just dropps down a line but that's all. My path is
Code:
/root/Documents/Wordlists/file.txt


For what I am doing everything I have found says my first option is correct.
# 2  
Old 02-15-2019
The split command will give no screen output if it works. It will have created files in the current directory, probably names xaa, xab, xac etc. so you probably end at xbj or somewhere like that. You can force it to create files matching a specific pattern (and directory) if you choose and you might be allowed to use the --verbose flag to see it creating files.

From the commands you have shown us, I don't see where crunch1.txt comes in to it. Can you capture everything on the screen in one go from this:-

Code:
set -x                                                      # Turn on debug
ls -l ~/Documents/Wordlists/file.txt                        # Show us what the input file is (... and assuming it is below your home directory)
file ~/Documents/Wordlists/file.txt                         # Show us if it is complex or plain text
head ~/Documents/Wordlists/file.txt                         # Show us if it is complex or plain text
cd $(mktmp -d)                                              # Creates & changes to a new directory in /tmp so we know it's empty.
split --verbose -b 1000m  ~/Documents/Wordlists/file.txt    # Attempt the work
pwd ; ls -l                                                 # Show us the output
set +x                                                      # Turn on debug

If you can paste this back wrapped in CODE tags then we can see where we are.



Thanks, in advance,
Robin
These 3 Users Gave Thanks to rbatte1 For This Post:
# 3  
Old 02-15-2019
After you said I may not see it doing anything I went looking back through. In my home dir I have file xaa thru xad and those were not there when I looked before and have not done anything since. But yes those are in the home dir. But they are off in size. Two files are 1gb but 2 are less than half a gig. My file I was splitting is 35gb and some change.

--- Post updated at 06:43 PM ---

I also ran yours
Code:
split --verbose -b 1000m  ~/Documents/Wordlists/crunch1.txt

and it is creating the files. I have a theory. When I didn't see anything returning then after a couple of minutes I closed the console and went back looking online to see what I had missed. When I closed the console I am assuming I stopped the action. That is why I only had those files I mentioned before. With it creating the files now and I can see what it is doing I can see that it takes some time. I need to stay with verbose with everything so I can get a better understanding of what it is doing for no forward.
Coming out of a mostly Windows environment and into Kali is just going to take some getting used to.


I am going to have to give this vm more hard drive.



More than anything I want to thank you! I mean thank you biggly as Trump would say.



Below is the results


Code:
root@kali:~# split --verbose -b 1000m  ~/Documents/Wordlists/crunch1.txt
creating file 'xaa'
creating file 'xab'
creating file 'xac'
creating file 'xad'
creating file 'xae'
creating file 'xaf'
creating file 'xag'
creating file 'xah'
creating file 'xai'
creating file 'xaj'
creating file 'xak'
creating file 'xal'
creating file 'xam'
creating file 'xan'
creating file 'xao'
creating file 'xap'
creating file 'xaq'
creating file 'xar'
creating file 'xas'
creating file 'xat'
creating file 'xau'
creating file 'xav'
creating file 'xaw'
split: xaw: No space left on device

# 4  
Old 02-18-2019
I did not know if that last message went through. I sent it and my Kali locked up thus it had crashed because of the size of the file and the one I was splitting. Just got back up and running.


I really do want to that you guys. Your wonderful!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to split large file with different record delimiter?

Hi, I have received a file which is 20 GB. We would like to split the file into 4 equal parts and process it to avoid memory issues. If the record delimiter is unix new line, I could use split command either with option l or b. The problem is that the line terminator is |##| How to use... (5 Replies)
Discussion started by: Ravi.K
5 Replies

2. UNIX for Beginners Questions & Answers

sed awk: split a large file to unique file names

Dear Users, Appreciate your help if you could help me with splitting a large file > 1 million lines with sed or awk. below is the text in the file input file.txt scaffold1 928 929 C/T + scaffold1 942 943 G/C + scaffold1 959 960 C/T +... (6 Replies)
Discussion started by: kapr0001
6 Replies

3. UNIX for Dummies Questions & Answers

Split large file to smaller fastly

hi , I have a requirement input file: 1 1111111111111 108 1 1111111111111 109 1 1111111111111 109 1 1111111111111 110 1 1111111111111 111 1 1111111111111 111 1 1111111111111 111 1 1111111111111 112 1 1111111111111 112 1 1111111111111 112 The output should be, (19 Replies)
Discussion started by: mechvijays
19 Replies

4. Shell Programming and Scripting

Split a large file

I have a 3 GB text file that I would like to split. How can I do this? It's a giant comma-separated list of numbers. I would like to make it into about 20 files of ~100 MB each, with a custom header and footer. The file can only be split on commas, but they're plentiful. Something like... (3 Replies)
Discussion started by: CRGreathouse
3 Replies

5. Shell Programming and Scripting

Split large file based on last digit from a column

Hello, What's the best way to split a large into multiple files based on the last digit in the first column. input file: f 2738483300000x0y03772748378831x1y13478378358383x2y23743878383802x3y33787828282820x4y43748838383881x5y5 Desired Output: f0 3738483300000x0y03787828282820x4y4 f1... (9 Replies)
Discussion started by: alain.kazan
9 Replies

6. Shell Programming and Scripting

Splitting a large file, split command will not do.

Hello Everyone, I have a large file that needs to be split into many seperate files, however the text in between the blank lines need to be intact. The file looks like SomeText SomeText SomeText SomeOtherText SomeOtherText .... Since the number of lines of text are different for... (3 Replies)
Discussion started by: jwillis0720
3 Replies

7. Shell Programming and Scripting

split large file based on field criteria

I have a file containing date/time sorted data of the form ... 2009/06/10,20:59:59.950,XAG/USD,Q,1,1115, 14.3025,100,1,1 2009/06/10,20:59:59.950,XAG/USD,Q,1,1116, 14.3026,125,1,1 2009/06/10,20:59:59.950,XAG/USD,R,0,0, , 0,0,0 2009/06/10,20:59:59.950,XAG/USD,R,1,0, 14.1910,100,1,1... (6 Replies)
Discussion started by: asriva
6 Replies

8. Shell Programming and Scripting

Split Large File

HI, i've to split a large file which inputs seems like : Input file name_file.txt 00001|AAAA|MAIL|DATEOFBIRTHT|....... 00001|AAAA|MAIL|DATEOFBIRTHT|....... 00002|BBBB|MAIL|DATEOFBIRTHT|....... 00002|BBBB|MAIL|DATEOFBIRTHT|....... 00003|CCCC|MAIL|DATEOFBIRTHT|.......... (1 Reply)
Discussion started by: AMARA
1 Replies

9. Shell Programming and Scripting

Split a large file with patterns and size

Hi, I have a large file with a repeating pattern in it. Now i want the file split into the block of patterns with a specified no. of lines in each file. i.e. The file is like 1... 2... 2... 3... 1... 2... 3... 1... 2... 2... 2... 2... 2... 3... where 1 is the start of the block... (5 Replies)
Discussion started by: sudhamacs
5 Replies

10. Shell Programming and Scripting

Split A Large File

Hi, I have a large file(csv format) that I need to split into 2 files. The file looks something like Original_file.txt first name, family name, address a, b, c, d, e, f, and so on for over 100,00 lines I need to create two files from this one file. The condition is i need to ensure... (4 Replies)
Discussion started by: nbvcxzdz
4 Replies
Login or Register to Ask a Question