• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 943
  • Last Modified:

xcopy in unix

I am using unix 386 ver 3.2.
I want to know if i can copy a whole directory along with all sub-directories as with dos xcopy command.
0
angshuman_b
Asked:
angshuman_b
  • 2
1 Solution
 
Brian UtterbackPrinciple Software EngineerCommented:
Try something like this:

tar cf - dirtocopyfrom | (cd dirtocopyto ; tar xf - )
or
tar cf - * | (cd dirtocopyto ; tar xf - )

0
 
mliberiCommented:
$ cp -rp sourcedir destdir

or (if you want to preserve also last modification time)

$ find sourcedir | cpio -pdm destdir
0
 
mliberiCommented:
$ cp -rp sourcedir destdir

or (if you want to preserve also last modification time)

$ find sourcedir | cpio -pdm destdir
0
 
tiaCommented:
cp -r sourcedir destdir
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now