Computing.Net > Forums > Unix > xcopy on unix

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

xcopy on unix

Reply to Message Icon

Name: Miskva
Date: July 25, 2003 at 15:59:21 Pacific
OS: HPUX11
CPU/Ram: -
Comment:

Hi,

I was looking for a command to do the following :

xcopy c:\source\*.* c:\backup /d /s

Yes, this is a DOS command, but it performs something which I need on Unix: copy a full directory structure .. but only the new, or newer (changed) files ...



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: July 25, 2003 at 19:26:50 Pacific
Reply:

Have a look at the man pages for rsync. It will do exactly what you want, locally or between hosts.


0

Response Number 2
Name: James Boothe
Date: July 26, 2003 at 06:10:27 Pacific
Reply:

rsync may not be available on Miskva's HPUX11.

I use rdist on that platform for syncing directory trees between hosts, but I don't know if rdist could be used to sync two directory trees on the same host.

Note that "syncing" can involve removal of subdirectories and/or files to make the target directory tree same as the source directory tree.


0

Response Number 3
Name: David Perry
Date: July 26, 2003 at 06:47:20 Pacific
Reply:

If your hp-ux box does not already have rsync, you can find it at the

Software Porting And Archive Centre for HP-UX

http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/rsync-2.5.6/

Deleting files and directories can be controlled with command line parameters. The --existing flag will only update files that already exist.


0

Response Number 4
Name: SirMiskva2
Date: July 27, 2003 at 02:21:19 Pacific
Reply:

Hi,

Thanks for the response. I will try the two executables, as mentioned here. Will keep you up to date.

The issue with the directories .. thats not too bad, it actually is a "bug" which separates the aboved mentioned xcopy and a real synchronising tool .. Cant blame xcopy for that, it just copies ..

So, will keep you up to date ..


0

Response Number 5
Name: ArnoldF
Date: July 27, 2003 at 13:30:10 Pacific
Reply:

cd /root/source
find . -cnewer /backup |cpio -pdvm /backup


0

Related Posts

See More



Response Number 6
Name: Miskva_013
Date: July 31, 2003 at 12:42:21 Pacific
Reply:

Hi

I tried the solution with find and cpio, cause that one seems most easy, and no special setup is needed ..

command works .. well: almost ... tried this:

cd /root/source
find . -newer /backup |cpio -pdvm /backup

it does copies new files, but only if the old version exists in the target .. in other words, it doesnt copy new files !


0

Sponsored Link
Ads by Google
Reply to Message Icon

mailbox cleaner ls gives permission denie...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: xcopy on unix

Looking for info on Unix Database called www.computing.net/answers/unix/looking-for-info-on-unix-database-called/1984.html

security level on unix nfssystems (windo www.computing.net/answers/unix/security-level-on-unix-nfssystems-windo/2087.html

java on unix www.computing.net/answers/unix/java-on-unix/5754.html