ubuntu有wget,win10有iwr

在PowerShell中,你可以使用iwr命令(Invoke-WebRequest)代替curl来下载文件。例如,要将https://raw.githubusercontent.com/awsm-research/A3Test/main/Defects4j%20Method/Methods_Chart.txt下载并保存为chart.txt,可以在相应目录下运行iwr-OutFilechart.txthttps://raw.githubusercontent.com/awsm-research/A3Test/main/Defects4j%20Method/Methods_Chart.txt。此方法适用于不允许curl执行的系统。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

比如我想下载https://raw.githubusercontent.com/awsm-research/A3Test/main/Defects4j%20Method/Methods_Chart.txt这一文件到本地,命名为chart.txt

那么打开powershell,进入想要的目录运行

iwr -outf chart.txt https://raw.githubusercontent.com/awsm-research/A3Test/main/Defects4j%20Method/Methods_Chart.txt

P.S. 这个命令相对curl是不那么主流的,奈何curl系统不让执行。

更多类似的命令可以参见https://superuser.com/questions/25538/how-to-download-files-from-command-line-in-windows-like-wget-or-curl

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

CSU迦叶

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值