 |
forums.xandros.com Xandros User Forums
|
| View previous topic :: View next topic |
| Author |
Message |
justadrifter Xplorer
Joined: 25 May 2006 Posts: 14
|
Posted: Fri Jul 21, 2006 8:28 am Post subject: Xandros equivalent of xcopy |
|
|
I need the Linux equivalent of:
xcopy c:\folder h:\folder\ /s /e /d /c /y
which basically copies all new and updated files from c:\folder to h:\folder\, including all subdirectories, without stopping for confirmation every time it overwrites a file.
It would really be nice to somehow launch this with a desktop icon.
It would be nice beyond all belief if this could be a scheduled task.
Thanks! |
|
| Back to top |
|
 |
drl Xandrosianding

Joined: 20 Jan 2004 Posts: 563 Location: St Paul, Minnesota
|
Posted: Fri Jul 21, 2006 9:07 am Post subject: |
|
|
Hi, justadrifter.
I don't know anything about xcopy, but, going by your description, there's good news, good news, and bad news.
The first good news is that anything (that I know of) that can be executed from the command line can be scheduled. See man crontab and practice a bit.
The second good news is that there is a command that copies changed files, optionally recursively, from one directory to another.
The bad news is that the command, rsync, is complicated. See man rsync for details, examples, and practice.
I do this every night for my home directory.
Other posters may have additional suggestions.
Best wishes ... cheers, drl _________________
[ "Sure, I can help you with that." -- USBank voice recognition system. ]
( Mn, 3.0.3B, 2.6.11-x1, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP ) |
|
| Back to top |
|
 |
pitheris Xandrosian

Joined: 07 Mar 2006 Posts: 202 Location: USA
|
Posted: Fri Jul 21, 2006 6:32 pm Post subject: |
|
|
rsync -a source_directory destination
or
cp -a source_directory destination
The "a" is for archive and means that it will copy recursively and preserve permissions and symlinks and not overwrite files with the same date & size.. You will have problems if you are copying to a fat partition because there are no owners, permissions, or symlinks on a vfat system. |
|
| Back to top |
|
 |
drl Xandrosianding

Joined: 20 Jan 2004 Posts: 563 Location: St Paul, Minnesota
|
Posted: Fri Jul 21, 2006 6:45 pm Post subject: |
|
|
Hi, pitheris.
Thanks for adding the post on cp; I didn't know it had the extra capability. It looks like one might also need -u for update on the cp, yes?
I like rsync because it can also create what one might call an archive: for a file that it replaces in a target directory from a source, it copies the old version to a third separate directory. Not for everyone, but I like the extra insurance ... cheers, drl
| pitheris wrote: | | cp -a source_directory destination |
_________________
[ "Sure, I can help you with that." -- USBank voice recognition system. ]
( Mn, 3.0.3B, 2.6.11-x1, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP ) |
|
| Back to top |
|
 |
shengchieh Xandrosianschwing
Joined: 11 Jan 2004 Posts: 2382 Location: Palo Alto, CA
|
|
| Back to top |
|
 |
justadrifter Xplorer
Joined: 25 May 2006 Posts: 14
|
Posted: Sun Jul 23, 2006 12:06 am Post subject: |
|
|
| Thanks! That looks to be exactly what I was looking for. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|