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

Re: find -mtime -1 | xargs scp ... user@remote:/dest/path



On Sun, Sep 29, 2002 at 06:02:53PM -0500, Michael Heironimus wrote:
> On Sun, Sep 29, 2002 at 10:19:03AM -0500, will trillich wrote:
> > 	xargs -i# command # suffix
> 
> Since # is almost always a shell metacharacter, it's not surprising that
> this doesn't work. Try using an alpha sequence, what I usually use is
> "xargs -iXXX foo XXX bar".
> 
> By the way, if you're absolutely certain that there are no "special"
> characters or spaces in any of the filenames, you can also use
>   scp -options `find . -options` user@host:dir

i hadn't thought of that. very sneaky.

sadly, there are spaces and apostrophe's (windo~1 files, of
course) -- and there's a possibility that the resulting list
from the `find` command might overflow the command buffer as
well, so the first suggestion is the winner, assuming i can get
it to work.

thanks!

-- 
I use Debian/GNU Linux version 2.2;
Linux server 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i586 unknown
 
DEBIAN NEWBIE TIP #98 from Joost Kooij <joost@topaz.mdcc.cx>
:
Curious about your NETWORK TRAFFIC? There's iptraf, showtraf,
netwatch, tcpview, statnet... and tcpdump, which uses its own
filters from the specification you give it on the command line:
	tcpdump host foo
	tcpdump not port ssh
	tcpdump port 53
	tcpdump arp
Try "man tcpdump" for more info.

Also see http://newbieDoc.sourceForge.net/ ...



Reply to: