Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #181010

Re: how to copy files

From Dan Ritter <dsr@randomstring.org>
Newsgroups linux.debian.user
Subject Re: how to copy files
Date 2017-05-15 01:40 +0200
Message-ID <tHbhf-8tb-5@gated-at.bofh.it> (permalink)
References <tH8Mp-6zv-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, May 15, 2017 at 04:57:35AM +0800, Long Wind wrote:
> I have a folder in hard drive and a backup of it is made in a USB disk
> Now some new files are added to the folder in hard drive
> how to make the folder in USB disk the same as in hard drive?
> 
> I want a program that can check the two folders
> if file size and file name are same, they are regarded as same
> if not, update is needed
> 
> I have try rsync, but can't find such options

That's the default for rsync.

rsync /path/to/originals/  /path/to/copies/

add -r for recursion into subdirectories
add -v for verbosity
add -a (archive) to keep ownership, groups, and permissions
       identical. That usually needs root privileges.

There are a lot of other options to rsync; you can have
unrecognized files in the destination ignored or deleted.

You can require the contents of all files to match, rather than
just their name and size.

You can have special exclusions and inclusions.

If you need changes on both directories to be reflected in each
other, you want unison instead of rsync.

-dsr-

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

how to copy files Long Wind <longwind2009@gmail.com> - 2017-05-14 23:00 +0200
  Re: how to copy files Lisi Reisz <lisi.reisz@gmail.com> - 2017-05-14 23:50 +0200
  Re: how to copy files Dan Ritter <dsr@randomstring.org> - 2017-05-15 01:40 +0200
    Re: how to copy files Long Wind <longwind2009@gmail.com> - 2017-05-15 05:20 +0200
      Re: how to copy files Dejan Jocic <jodejka@gmail.com> - 2017-05-15 09:20 +0200
        Re: how to copy files Felix Dietrich <felix.dietrich@sperrhaken.name> - 2017-05-20 15:50 +0200
          Re: how to copy files Dejan Jocic <jodejka@gmail.com> - 2017-05-20 16:20 +0200
  Re: how to copy files Greg Wooledge <wooledg@eeg.ccf.org> - 2017-05-15 14:50 +0200

csiph-web