-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
find /server -type f -mtime +30 -exec mv -v {} /archive/ \;
cd /archive ; find . -type f -exec rm -v /server/{} \;
On 01/29/13 18:59, LuKreme wrote:
> I have two folders, let's call them Server and Archive.
>
> What I want to do is send all the files from server that are older
> than… say 30 days to archive and delete them from server. OK, no
> problem. However, I also want to delete any files from Server that
> already exist on Archive.
>
> So let's say on 28-01-2013 I have
>
> Server: 23-10-2011 31-12-2012 14-12-2012 17-01-2013
>
> Archive: 23-10-2011 17-01-2013
>
> . . . run rsync command here . . .
>
> Files left on Server: 31-12-2012 # less than 30 days old
>
> Files on Archive: 23-10-2011 # was already there 14-12-2012 # more
> than 30 days old 17-01-2013 # was already there
>
>
- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb Phone: (407) 252-6853
Systems Administrator Internet:
FutureQuest, Inc. [email protected] (work)
Orlando, Florida [email protected] (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlEIZWoACgkQVKC1jlbQAQdQVwCdG352d5t4RuLOFMKuc7oodraZ
ChsAoNat+TgrRPOiSV4cote8+ODSVRrO
=G4AI
-----END PGP SIGNATURE-----
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html