[ltp] Copying Files

James Knott linux-thinkpad@linux-thinkpad.org
Mon, 06 Dec 2004 17:20:24 -0500


SOTL wrote:
> On Monday 06 December 2004 11:04, SOTL wrote:
> 
>>On Monday 06 December 2004 10:55, James Knott wrote:
>>
>>>SOTL wrote:
>>>
>>>>Hi All
>>>>
>>>>I want to copy all files in a partition to another partition.
>>>>
>>>>Can I do the following?
>>>>
>>>>dd     if=dev/hda5/*     of=dev/hda6/*
>>>>
>>>>If not how do I need to modify this or what should I utilize?
>>>
>>>I don't think you need the "/*" at the end.  You're copying partitions,
>>>not files.
>>
>>I DO NOT want to copy the partitions but All files located under the
>>partition hda5 to partition hda6.
>>
>>In fact the actual partition itself is what I am trying to get rid of but I
>>do want the data files.
>>
>>Do I use the * to do this or not?
>>
>>Frank
> 
> Judging from the response I am not explaining myself well. I guess because I 
> do not understand what my question is.
> 
> I have two directories one was fat32 hda5 and one is est2 hda6.
> hda5 partition table was corrupted by myself in attempts to restore system. 
> hda5 will NOT mount.
> hda6 will mount.
> Yesterday I copied an executable file for Mandrake from a CD to floppy by a 
> variation of the above command.
> The question that I am asking is can the data from hda5 be copied to hda6 by 
> another variation of the above command WITH OUT mounting hda5?
> If not is there another command that will copy the data?

As I mentioed earlier, you can copy partitions, using dd.  However I 
don't know what it would do with the corruption.  You can copy 
individual files with dd, but the partition must be mounted, to access 
files.  You're probably better off with disk recovery utilities.  One 
cardinal rule, is to use a copy for recovery.  Never try to recover the 
original disk.