Some file copying help please

Waldher, Travis R Travis.R.Waldher at boeing.com
Tue Apr 19 22:00:38 UTC 2005


I need to copy data from here

/dir1/dir2/dir3/dir4 

To 

/dir5/dir2/dir3/dir4

I need the path of dir2 on down to remain in tact.  But the top folder
is changing.

I basically want to copy dir4 from one filesystem to another and retain
it's path, short the name of the first directory (dir1/dir5).  Without
having to manually go in and create dir2 and dir3, which are both empty.

IS there a way to make cp do this?  I can't find one, it just errors out
stating that the destination path is invalid.  I'm struggling to find a
way to get tar to do this well.

I have about 400 directories like this to copy, so I need to figure out
a command line to script this sucker out.

Thanks,
Travis




More information about the Redhat-install-list mailing list