LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Deleting parts with cat when merging (https://www.linuxquestions.org/questions/linux-newbie-8/deleting-parts-with-cat-when-merging-253596/)

Stirner 11-11-2004 08:44 AM

Deleting parts with cat when merging
 
Hi:
I have to copy a large file (4 GB) from a crashed WinXP machine into an external HD connected to a USB port using the Knoppix live CD. Then i have to copy the large file into a working WinXp machine.
The external HD was NTFS. I used Captive NTFS and it found all necessary drivers but still it could not write in the external HD. Using QTParted i set the filesystem in the external HD as FAT32, and then i could write many files, including very large ones. The external HD has a size of little less than 8 GB.
My problem is that when i attempt to copy the 4 GB file into the external HD the process is interrupted when 2 GB have been transferred with an error message similar to "Process died unexpectedly". I read thru messages here and i saw that most likely there is maximum file size problem in the FAT32 partition.
Option 1) is to split the 4 GB file into smaller pieces into the FAT32 partition
split -b 1000m filename /mnt/sda1/filename
where sda1 is the external HD. My first question is
Q. 1) do i need to rejoin the parts in the external HD before i copy the file into the working WinXP machine? Or can i copy the parts individually into the WinXP and rejoin them using MS-DOS? I ask this because if a rejoin the parts in the external HD then i would need to delete the parts as they are being rejoined because both the parts (4 GB) plus the entire rejoined file (4 GB) will not fit into the <8 GB external HD (partition sda1). This leads to my second question,
Q. 2) is there a simple modification to the cat command
cat filenamead >> /mnt/sda1/filenameaa
that will delete the parts as they are being re-assembled so that i will not reach the size of the external HD?
Option 2) is to reformat again the external HD to ext2 and then i will not have the problem of exceeding the size limit of FAT32. This leads to my third question
Q. 3) if i write the large 4 GB file into the ext2 filesystem in the external HD will it be recognized later by WinXP when i finally transfer the file into the working WinXp machine?
I hope i presented my questions clearly enough. English is a second language to me and on top of that, i am a linux newbie. Thanks,
Stirner

Tinkster 11-11-2004 11:59 AM

Quote:

Q. 1) do i need to rejoin the parts in the external HD before i copy the file into the working WinXP machine? Or can i copy the parts individually into the WinXP and rejoin them using MS-DOS? I ask this because if a rejoin the parts in the external HD then i would need to delete the parts as they are being rejoined because both the parts (4 GB) plus the entire rejoined file (4 GB) will not fit into the <8 GB external HD (partition sda1). This leads to my second question,
winDOHs' copy command (in conjunction with the
-b (binary) switch should be able to do it just like
cat ...


Quote:

Q. 2) is there a simple modification to the cat command
cat filenamead >> /mnt/sda1/filenameaa
that will delete the parts as they are being re-assembled so that i will not reach the size of the external HD?
Nope.


Quote:

Q. 3) if i write the large 4 GB file into the ext2 filesystem in the external HD will it be recognized later by WinXP when i finally transfer the file into the working WinXp machine?
I hope i presented my questions clearly enough. English is a second language to me and on top of that, i am a linux newbie.
There are some NT/XP drivers for Linux-filesystems,
I think ext2/3 is among them ... they don't come with
the system, though, you'll have to find and install them.



Cheers,
Tink

Stirner 11-11-2004 12:17 PM

Hi Tink,

I have decided to copy the split parts and re-assemble them using DOS commands.
However, when i am on Knoppix in the WinXP crashed machine, and i go to Root Shell and type

split -b 1000m /mnt/hda1/filename.xxx /mnt/sda1/filename

the system responds

split: mnt/hda1/filename.xxx: No such file or directory

Nevertheless, I can see it with Conqueror, it is there.
What would be my error?

Cheers
Stirner

Tinkster 11-11-2004 11:53 PM

Hard to say, really ...

What does
ls -l /mnt/hda1/file*
say?


Cheers,
Tink

Stirner 11-12-2004 05:41 AM

My mistake Tink.
I typed the command hastily and put a ~ after the name of the file,
and then when i typed the command again carefully and with the correct name,
the system kept telling me the file was not found. When i closed the command line
and started it again, the system found the file and the split command worked fine. Now i have
completed my data rescue mission on the crashed WinXP system with Knoppix. I re-assembled the parts in DOS using
copy /b partaa+partbb...+partee joined.xxx
Thanks for your help.
Knoppix worked really well. I copied all small files using a pen drive. The big container had to be saved on an external 8GB HD connected thru the USB port using the split command because Knoppix has a 2GB limit on FAT32. The troubled machine is a Compaq Presario LA725 and for the Presarios in general the booting has to be done with acpi=off noscsi or otherwise Knoppix 3.6 will not boot. The experimental Linux kernel 2.6.x did not work either but the stable 2.4.x worked perfectly well.
I am no expert but i highly recommend Knoppix live CD as a rescue system.
Now i have to re-install WinXP on the Compaq and then install Knoppix (=Debian) in the HD to have a dual boot system.
Cheers and good day to all.
Stirner


All times are GMT -5. The time now is 10:38 PM.