Solved

xcopy in unix

Posted on 1999-01-07
4
864 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:
blu earned 50 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Where to get php 5.6 for AIX 7.1? 5 100
Most secure Linux or x86 Unix that are least prone to ransomware/malware 24 111
UNIX SCP 5 77
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 94
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

772 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