bedtime question : xargs
vu pham
vu at sivell.com
Fri Apr 24 19:13:57 PDT 2009
Christer Ekholm wrote:
> Vu Pham <vu at sivell.com> writes:
>
>> # find . -name "*.rpm" | xargs scp ??? root at remoteserver:
>>
>> How can I make each of the line to be set into the ??? of scp ?
>> I do not care if the directory tree is created or not on the remote
>> server
>
> If the list of filenames is not too long, you could just print them
> space-separated, and give that to scp, like this:
>
> scp `find . -name "*.rpm" -printf "%p "` root at remoteserver
>
Thanks, Christer. Yes, that works, too.
[root at xen2vm1 ~]# scp `find . -name "*.rpm" -printf "%p "` root at xen3:
root at xen3's password:
hello-1.0.0-2.src.rpm 100% 3056 3.0KB/s
00:00
hello-1.0.0-2.i686.rpm 100% 6473 6.3KB/s
00:00
hello-1.0.0-1.src.rpm 100% 3058 3.0KB/s
00:00
hello-1.0.0-1.i686.rpm 100% 6476 6.3KB/s
00:00
[root at xen2vm1 ~]#
Vu
More information about the Linux-users
mailing list