[quick] trying to split a large file but linux says it's to large
hi i'm trying to move servers and move all my data to the other server to i archived it up and it's a 90GB file but when i try to split it with a program like lxsplit i get the below error:
Quote:
|
just tried the split command and it gave this error:
Quote:
|
I assume that's a typo on your part (split: ytes=2048m)
What happens if you try split -b 2097152 infile |
it wasn't a typo that's just how the error was coming out with the "split –bytes=2048m file" command
that command you suggested is working but i added 3 more "0" so i get 2000mb files and not 2mb files but i have a question i'm getting files like xaa, xab, xab etc and there will be about 50 of these but how do i join them back together? |
Should have been
split –-bytes=2048m file (2 dashes) use cat to rejoin |
thanks for your help (again!) but there will be 50 randomly named files how do i join them with "cat" ?
|
There's nothing random in the files, you can set the prefix and the suffix as per man split.
cat xaa xab xac > outfile will work, but you'll probably want to script a loop for 50 files. |
Quote:
|
Quote:
Code:
for i in $(ls x??); do cat $i >> example.tar.bz2; done Code:
for i in $(ls); do cat $i >> example.tar.bz2; done |
Thanks - my looping is crap or I would have done it in my previous post.
|
thank you both very much!! when and split is done and i've moved them to my other server i'll try that loop command :)
|
No problem. BTW, make sure you checksum your file. :)
|
good idea.. how do i do that on linux? cksum filename right?
|
I once backed up my /home directory before installing SuSE 10.3. The resultant file would too large (30-40GB) for the vfat external drive I was backing up to. So I piped the output of tar through split and saved the slices on the external drive.
To restore, I mounted the drive, used cat and piped the output to the tar command. I didn't have to join the file first. I also used par2 to create parity files to enable the recovery of a damaged slice. The examples near the end of the tar command has an example of moving a large directory using the -C option or a subshell on the right hand side of the pipe. |
I'm not sure anout all the option here. I use md5sum, but there's also sha1sum and I would guess more.
Just have a look at man md5sum for example. Do this before the split and then after the rejoining on the other machine |
i'm trying to run "md5sum -c filename" but i'm getting rubbish.. is a 95gb file to big?
Quote:
|
Have you already calculated the md5sum? The -c option is for checking.
Try md5sum filename > filename.md5 To check you would do md5sum -c filename.md5 |
All times are GMT -5. The time now is 06:26 PM. |