forums.xandros.com Forum Index forums.xandros.com
Xandros User Forums
 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Xandros equivalent of xcopy

 
Post new topic   Reply to topic    forums.xandros.com Forum Index -> Console
View previous topic :: View next topic  
Author Message
justadrifter
Xplorer


Joined: 25 May 2006
Posts: 14

PostPosted: Fri Jul 21, 2006 8:28 am    Post subject: Xandros equivalent of xcopy Reply with quote

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
View user's profile Send private message Visit poster's website
drl
Xandrosianding
Xandrosianding


Joined: 20 Jan 2004
Posts: 563
Location: St Paul, Minnesota

PostPosted: Fri Jul 21, 2006 9:07 am    Post subject: Reply with quote

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
View user's profile Send private message
pitheris
Xandrosian
Xandrosian


Joined: 07 Mar 2006
Posts: 202
Location: USA

PostPosted: Fri Jul 21, 2006 6:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
drl
Xandrosianding
Xandrosianding


Joined: 20 Jan 2004
Posts: 563
Location: St Paul, Minnesota

PostPosted: Fri Jul 21, 2006 6:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
shengchieh
Xandrosianschwing


Joined: 11 Jan 2004
Posts: 2382
Location: Palo Alto, CA

PostPosted: Fri Jul 21, 2006 9:43 pm    Post subject: Reply with quote

Out of curiousity, I did some googling about xcopy.
Here's what I found.

http://www.ss64.com/nt/xcopy.html
http://yolinux.com/TUTORIALS/unix_for_dos_users.html
http://www.bellevuelinux.org/freedos_commands.html

Sheng-Chieh
_________________
Back to top
View user's profile Send private message Visit poster's website
justadrifter
Xplorer


Joined: 25 May 2006
Posts: 14

PostPosted: Sun Jul 23, 2006 12:06 am    Post subject: Reply with quote

Thanks! That looks to be exactly what I was looking for.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.xandros.com Forum Index -> Console All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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