我对Shell脚本比较陌生,并面临以下问题。我想从http://commondatastorage.googleapis.com/freebase-public/站点下载最新的自由库转储。我知道文件名格式-freebase-rdf-..gz,例如freebase-rdf-2014-01-12-00-00.gz。
我检查了一下,"wget“命令得到了文件。但是,我的问题是,我需要找到最新的数据转储,然后运行wget命令从站点下载文件。我检查了wget命令不接受正则表达式。
有人能帮我解决这个问题吗?
发布于 2014-01-23 23:17:25
最新版本似乎在名为freebase-rdf-latest.gz
的文件中。若要在wget中获得它,请使用:
wget http://commondatastorage.googleapis.com/freebase-public/rdf/freebase-rdf-latest.gz
发布于 2014-01-23 23:16:19
您可以使用wget的时间戳函数:
存储您的最新下载和wget关心得到更新一次。
或者您可以获得一个目录listig (7.html)
If you specify a directory, Wget will retrieve the directory listing, parse it and convert it to HTML. Try:
wget ftp://prep.ai.mit.edu/pub/gnu/
lynx index.html
对其进行本地解析,对其进行排序,并获取wget调用的最后结果。
https://stackoverflow.com/questions/21326430
复制相似问题