[ltp] Copying Files

SOTL linux-thinkpad@linux-thinkpad.org
Mon, 6 Dec 2004 16:47:54 -0500


On Monday 06 December 2004 11:17, James Knott wrote:
> 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?
>
> If you're copying files, why not use the cp command?  That's what it's
> there for.  dd is often used to copy entire partitions to or from a file
> or to convert data in a file.  It is not used as a general file copy
> program.
>
> man dd for further info.

Things are not quite that simple. 

I am actively trying to recover data from a partition hda5 can not be mounted 
so commands that require mounting will not work.

Frank