Re: find and copy [Solved]

2013-09-17 Thread Chris Bannister
On Mon, Sep 16, 2013 at 12:19:39PM -0500, Craig L. wrote: > On Fri, Sep 06, 2013 at 12:52:09PM +1000, Zenaan Harkness wrote: > > > > You should be bonza, fab, good to go :) [...] > Well I don't know about bonza, and I thought fab was back in the sixties :). http://news.bbc.co.uk/2/hi/entertainmen

Re: find and copy [Solved]

2013-09-16 Thread Craig L.
On Fri, Sep 06, 2013 at 12:52:09PM +1000, Zenaan Harkness wrote: > > Sorry, I forgot you needed renaming. So -I option to xargs may be > useful for you. > > OK, try something like this: > > sh -c 'cp "$0" /tmp/data.backup/${HOSTNAME}".${0:2}"' {} \; > > find /tmp/var -mmin -60 -a -iname '*.sq

Re: find and copy

2013-09-05 Thread Zenaan Harkness
On 9/6/13, Craig L. wrote: > On Wed, Sep 04, 2013 at 07:16:42AM +1000, Zenaan Harkness wrote: >> > Both seem to be trying to copy the string '{}' and the directory >> > /var/data.backup/ to the directory name that is being piped to >> > xargs, the name of the found file in this case, which is how

Re: find and copy

2013-09-05 Thread Craig L.
Thanks Zenaan, for moving this back on-list (to anyone interested, I replied privately by mistake. Zenaan was gracious enough to accept my mistake) On Wed, Sep 04, 2013 at 07:16:42AM +1000, Zenaan Harkness wrote: > > It seems I was a bit cavalier on more than one count. My apologies. No apology

Re: find and copy

2013-09-03 Thread Zenaan Harkness
On 9/3/13, Craig L. wrote: > On Sun, Sep 01, 2013 at 11:26:07AM +1000, Zenaan Harkness wrote: >> On 9/1/13, Craig L. wrote: >> >> but evidently not quite ... >> > >> >find /var/lib/postgresql/9.1/backup -mmin -60 -a -iname '*.sql' \ >> >-execdir cp '{}' /var/data.backup/ ';' >> > >> > cop