LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 11-23-2012, 09:32 AM   #1
centguy
Member
 
Registered: Feb 2008
Posts: 627
Blog Entries: 1

Rep: Reputation: 48
rsync without copying files when the only difference is the time time


How to ask rsync not to copy files from A to B when the only difference is
in the creation time and probably permission ?

I have this problem when I used scp rather than rsync to copies files.
Later when I tried to rsync -av --delete, it seems I have to redo what scp has done just
because the time stamp is different ! Imagine I spend hours to scp
the huge across different platforms.

Thanks!
 
Old 11-23-2012, 09:42 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you can use the --checksum option but that involves.... well... a checksum being calculated for each file. by default rsync will copy on different times and sizes, the only other thing to go on is the contents of the file itself, which would most easily be a checksum.

Actually though, maybe you want this, for a looser perspective...

Code:
--size-only
Normally rsync will skip any files that are already the same length and have the same time-stamp. With
the --size-only option files will be skipped if they have the same size, regardless of timestamp. This
is useful when starting to use rsync after using another mirroring system which may not preserve
timestamps exactly.
Be very aware of the danger that you're opening yourself up to there though.

Last edited by acid_kewpie; 11-23-2012 at 09:47 AM.
 
Old 12-01-2012, 08:15 PM   #3
centguy
Member
 
Registered: Feb 2008
Posts: 627

Original Poster
Blog Entries: 1

Rep: Reputation: 48
Thanks for the reply. I created the thread because I was waiting for the rsync process to be completed. However, it seems the second round of

rsync -rltgoDv --delete --modify-window=1

is rather quick. I guess the rsync first works out checksum and decides to skip the copying the content but update only the time stamps /permission etc ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we see remaining time or % while copying big size files in RHEL? danykallery Linux - Software 3 03-09-2011 09:09 PM
how to understand user time, sys time, wait time, idle time of CPU guixingyi Linux - Server 1 08-24-2010 10:10 AM
adding time zone files to the time GUI interface noir911 Red Hat 1 03-08-2010 08:18 AM
Files' time/date lost in copying from live CD GandalfTheGrey Linux - Newbie 1 03-26-2009 10:50 AM
Help - My Samba share changes the timestamp when copying files to it.. Preserve Time. hheejj Linux - Software 2 06-28-2005 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 10:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration