Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

xcopy in unix

Posted on 1999-01-07
4
Medium Priority
?
929 Views
Last Modified: 2012-06-27
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
Comment
Question by:angshuman_b
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
Brian Utterback earned 100 total points
ID: 2008666
Try something like this:

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

0
 
LVL 3

Expert Comment

by:mliberi
ID: 2008667
$ cp -rp sourcedir destdir

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

$ find sourcedir | cpio -pdm destdir
0
 
LVL 3

Expert Comment

by:mliberi
ID: 2008668
$ cp -rp sourcedir destdir

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

$ find sourcedir | cpio -pdm destdir
0
 

Expert Comment

by:tia
ID: 2008669
cp -r sourcedir destdir
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question