Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy all subfolders and contents to another directory

Status
Not open for further replies.

WiccaChic

Technical User
Jan 21, 2004
179
US
Anyone have a script to copy an entire directory structure and all of its contents? I need to copy every folder under directory /dir1 to /dir2 and I am at a loss.

OS = AIX 5.2
 
man cp
cp -r

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
man cp
man tar
man cpio

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
(cd $SOURCE && tar cf - . ) | (cd $TARGET && tar xvfp -)

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 

cd $SRC; find . -depth -print|cpio -pd $TARGET
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top