Some file copying help please

gerrynix gerrynix at yahoo.com
Tue Apr 19 22:43:20 UTC 2005


--- "Waldher, Travis R" <Travis.R.Waldher at boeing.com> wrote:
> 
> 
> > -----Original Message-----
> > From: Cristian Tarhon [mailto:ctar at loc.gov]
> > Sent: Tuesday, April 19, 2005 3:11 PM
> > To: Waldher, Travis R; redhat-install-list at redhat.com
> > Subject: Re: Some file copying help please
> > 
> > cp -R /dir1/dir2 /dir5
> > 
> > 
> > This message sent from BlackBerry Enterprise Server.
> > 
> 
> I should have said something else more accurately.
> 
> The source data, dir2 and dir3 have tons of data in them.  I just want
> dir4 and it's contents to be copied, but except for dir1's name.  I need
> to retain the path to get to dir4 on the new filesystem.
> 
> Does that make more sense?
> 
> (I think I need some coffee)

Well maybe the hard way is the best (easiest) way,
and you can drink as much coffee as you like :)

Assuming that dir5 does not exist, create the empty
directory tree first:

mkdir -p /dir5/dir2/dir3/dir4  

then go to the source (dir4)

cd /dir1/dir2/dir3/dir4  
 
then while in THIS dir4:

find . -print | cpio -pvdum /dir5/dir2/dir3/dir4

then
 
/dir5 - /dir5/dir2 and /dir5/dir2/dir3 will remain empty,
while /dir5/dir2/dir3/(dir4) will be duplicated 
--
Nix
 
I need the path of dir2 on down to remain in tact.  But the top folder 
is changing. 

> 
> _______________________________________________
> Redhat-install-list mailing list
> Redhat-install-list at redhat.com
> https://www.redhat.com/mailman/listinfo/redhat-install-list
> To Unsubscribe Go To ABOVE URL or send a message to:
> redhat-install-list-request at redhat.com
> Subject: unsubscribe
> 




More information about the Redhat-install-list mailing list