[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Find and copy script/piped command
- From: Rick Stevens <rstevens vitalstream com>
- To: redhat-install-list redhat com
- Subject: Re: Find and copy script/piped command
- Date: Thu, 30 Oct 2003 13:00:58 -0800
Waldher, Travis R wrote:
-----Original Message-----
From: A. John Peters [mailto:ajpeters ajpconsult com]
Sent: Thursday, October 30, 2003 9:24 AM
To: redhat-install-list redhat com
Subject: Find and copy script/piped command
I am trying to copy all files changed in the last 24 hours to
a new directory.
find /home/Nursery -mtime -1
I want all the results copied to todays directroy
cp {results} /home/Thursday/
If I have to I can tar with a z option.
Any hints?
Is this for backup purposes? If so, wouldn't you want to preserve the
directory paths?
And do you really want to copy stuff that's less than one day old? If
you want to back up yesterday's stuff, set your script to run sometime
after midnight and use:
find /home/Nursery -daystart -mtime +0 -exec cp \{\} /home/Thursday \;
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer rstevens vitalstream com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- Batteries not included. Offer not valid in some states. -
- Your mileage may vary. Void where prohibited. -
----------------------------------------------------------------------
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]