Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Is there a Linux version of xcopy

Posted on 2014-11-19
2
Medium Priority
?
311 Views
Last Modified: 2014-11-20
In WIndows, I can copy all the contents of the directory, -- and the respectivie subdirectoires with the following command

cd \dest
xcopy \src\*.* /s

With the /s allowsing the subdirectories and theri contents to be recursively copied

Is there an equivalent command for Linux ?

Thanks
0
Comment
Question by:Anthony Lucia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 37

Assisted Solution

by:Neil Russell
Neil Russell earned 1000 total points
ID: 40453238
$ cp -r  /source/*.* /destination

See MAN page of cp for full help details

$ man cp
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 1000 total points
ID: 40453336
cp can even do what xcopy cannot: preserve the original timestamp and ownership information  of the copied files!

To achieve this add the "-p" flag:

cd /dest
cp -rp /source/* .

When using *.* instead of a single * cp will only copy files whose names contain a dot!
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

670 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