Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT: Copy directories in a special manner
Date: Sat, 05 Feb 2011 09:52:29
Message-Id: 20110205095040.11d56fd0@digimed.co.uk
In Reply to: [gentoo-user] OT: Copy directories in a special manner by meino.cramer@gmx.de
1 On Sat, 5 Feb 2011 08:05:05 +0100, meino.cramer@×××.de wrote:
2
3 > Now I need a copy mechanism which does the following:
4 > * copy all files with newer date to 'target' -- this can be done via
5 > 'cp -u'
6 > * copy all files which only exist in 'source' to 'target' --
7 > this can be done also with 'cp -u'
8 > * BUT: Delete all files from 'target' which do not longer exist in
9 > 'source'
10
11 rsync -a --delete source/ dest/
12
13
14 --
15 Neil Bothwick
16
17 Top Oxymorons Number 36: Alone together

Attachments

File name MIME type
signature.asc application/pgp-signature