On Tue, 15 Oct 2013 22:57:05 +0000, EXT-Schwarz, Barry 
<[email protected]> wrote:

>If both directories can be reached from an lpar, then why not use the cp 
>command with a suitable wild card in the source path.  Or you could tar the 
>source directory and pipe the output to an "untar" command that specifies the 
>desired destination.
>

I haven't been paying a much attention to this thread, but when
copying a file system or from dir to dir on the same LPAR (or shared file
 systems within a sysplex) I often recommend copytree to people that aren't
unix savvy.   "cp" and pax are both options as mentioned, but you need to 
pay have the correct flags to get all the sub directories and preserve
the file mode, owner info, date/time and other extended attributes (pgm
control, apf, etc.). 

Assuming you have bpx.superuser authority, copytree will do all of this
for you with simple syntax out having to know or understand all the pax or
cp flag options.

There are other flags, but "s" will set the euid to 0 if you have the auth
and the syntax is:

         copytree -s  fromdir  todir

copytree is a REXX exec and lives in /samples, so you can examine the source
code for details if you wish, but there is a man page on it these days also. 

Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS  
mailto:[email protected]     
ITIL v3 Foundation Certified                                     
Mark's MVS Utilities: http://www.mzelden.com/mvsutil.html 
Systems Programming expert at http://search390.techtarget.com/ateExperts/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to