2016-01-29 29 views

回答

1

这里是将文件下载到特定位置的例子:

wget http://locationforfilebeinghosted.com/file -P /Some/Location 

随着wget的,没有覆盖文件的方式。您可以使用-N这将检查时间戳,但是当您下载时不会覆盖,除非网站上托管的文件的实际时间戳较新。

所以,你可以:

#!/bin/bash 
wget http://locationforfilebeinghosted.com/file -P ${someLocation} 
mv -f ${someLocation} ${newLocation] 

应该覆盖。

0

您可以使用wget像已经提到或卷曲

$(curl -s http://linktofile) > filename 

的-s是silent选项。

相关问题