How can I split a file, without using 'split'?
Im in a unique situation where a box has a 400G file, on FreeBSD, without the 'split' utility available.
How can I split this file into 25G chunks? |
Hello,
Have you thought about using dd? Maybe something like the following? Code:
dd if=/home/user/largefile of=/home/user/splitfile1 bs=1M count=1000 Cheers, Josh |
To add to that past though, you would then need to use "skip=XXX" to skip the first XXX blocks of data so you can split the rest of the file without using the first split section. For the reference, here is the man page - http://linux.die.net/man/1/dd
Cheers, Josh |
Wouldnt that just copy the first 1Gb of the file to another file?
How would you split the 400G file into 2 perfect pieces? Something like, dd (1 to 200G) > file1, dd (200 to 400G) > file2? ---------- Post added 05-20-11 at 02:02 PM ---------- Quote:
Any other suggestions aside from dd? Because oddly enough, that program isn't on there either. :( Maybe cut? cat? Im grasping for straws here. |
Ouch, damn dude. Can't you just download the utilities and compile them for the system?
|
Its a "FreeNas" box and has exactly "Crap" on it for utilities, compilers, etc... They cripple it pretty good.
I could copy the file off and split it on a real OS with split, but the copy time is prohibitive for me. Im reaching out and hoping that someone can pull out that magic "Oh yeah, you can use a combination of echo, cat and ls" idea. |
Hmm... Came across this: http://paulbradley.tv/44/
But the question is, do you have access to the tar command? I really hope so..... LOL |
tar might be another option.
Not quick enough... |
Quote:
|
Quote:
This will work, thanks Corp |
No problem dude!
Cheers, Josh |
Code:
locate split | grep ports | less Code:
cat /usr/ports/sysutils/lxsplit/pkg-descr |
All times are GMT -5. The time now is 09:20 PM. |