我需要从远程服务器获取列表中指定的一组文件。我使用了一个 Matlab 脚本(在 Centos6 机器上):
for k=1:length(u_list)
o_name = fullfile(outFolder, names{k});
i_name = u_list{k}.url;
[status, result] = unix(['wget -O ' o_name ' ' i_name]);
end
这不是很好用。 我遇到了很多 wget 进程卡住
ps aux |grep wget
显示很多 wget 实例卡住了,一些文件没有通过。在我看来,问题在于 matlab 没有等待“系统”调用返回。 有什么建议吗?
编辑:url 有一个 excape 字符“&”。 正在做: unix(['wget -O 'o_name' --timeout=100 "'i_name'"']);
成功了。
最佳答案
url 有一个 excape 字符“&”。正在做:
unix(['wget -O ' o_name ' --timeout=100 "' i_name '"']);
成功了。
关于linux - 来自 matlab 脚本的 wget - 卡住的线程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25761020/