[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Find and copy script/piped command
- From: bdegan ticnet com
- To: redhat-install-list redhat com
- Subject: Re: Find and copy script/piped command
- Date: Thu, 30 Oct 2003 12:32:59 -0600 (CST)
You could do:
find /tmp -mtime -1 -exec bkup.sh {} \;
and then the bkup.sh script could do something like:
if [ -f $1 ] ; then
file=`echo $1 | awk '{n=split($0,AR, "/");print AR[n] }'`
cp -v $1 /tmp/backup/$file
fi
On Thu, 30 Oct 2003, A. John Peters wrote:
> 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?
>
>
> _______________________________________________
> Redhat-install-list mailing list
> Redhat-install-list redhat com
> https://www.redhat.com/mailman/listinfo/redhat-install-list
> To Unsubscribe Go To ABOVE URL or send a message to:
> redhat-install-list-request redhat com
> Subject: unsubscribe
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]