Solved

xcopy in unix

Posted on 1999-01-07
4
873 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

821 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