Trying To Split a Large File

Trying to split a 35gb file into 1000mb parts. My research shows I should you this.

 split -b 1000m file.txt

and my return is "split: cannot open 'crunch1.txt' for reading: No such file or directory" so I tried

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

/root/Documents/Wordlists/file.txt

For what I am doing everything I have found says my first option is correct.

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:-

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

3 Likes

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

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

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

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!