[Wylug-discuss] Copy files by date

linux@sh2515.plus.com linux at sh2515.plus.com
Wed Jan 25 08:08:50 UTC 2012


Hi

I am having trouble with some macs. I need to copy lots of files in subdirectories - temporarily everyday - without cron from server a server b from work created yesterday.

I came up with.
cd /server/a
find . -iname "*.txt" -mtime -1 ¦ xargs -I % cp -r % ~/test/

Sorry no pipe symbol on mobile between find and xargs.

The find on our macs don't have -daystart argument so I am finding it inaccurate. Anyway to copy files by yesterdays date manually starting script everyday?

do it by date? Or another method?

Sent from my HTC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/wylug-discuss/attachments/20120125/dbfdae9f/attachment.htm>


More information about the Wylug-discuss mailing list