RE: Need a script to update directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is one way. you'll have to tweak it to run on your system

find /PATH/new/* \( -mtime -1 \) -exec cp {} /PATH/old/* \;


-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx
[mailto:redhat-list-bounces@xxxxxxxxxx] On Behalf Of Burke, Thomas G.
Sent: Tuesday, January 02, 2007 9:37 AM
To: General Red Hat Linux discussion list
Subject: Need a script to update directories

Hey all,

	Background:  I do all my web page work in a personal directory
so as not to FUBAR the real web pages.  Problem is keeping the two
synchronized.

	I have thrown together a simple "copy script" that runs as part
of my nightly cron job - it copies *everything* from my working
directory to the actual web directory every night.  These are both on
the same machine, so access is not a problem.

	Problem:  Copying everything is slow and, generally, painful.
There's a couple 100 meg of data there.  I'm looking for a script to
update the web directory with newer/missing files.  I don't mind at all
if some stuff stays there, a true sync isn't necessary.  I just need to
get all the new content pushed to the appropriate place.

	Any ideas?

	TIA,
		Tom
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=subscribe
https://www.redhat.com/mailman/listinfo/redhat-list
**********************************************************************
This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged.  If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.  If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

                                   FADLD Tag
**********************************************************************


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux