PowerShell 使用 wget 只输出信息不下载问题

PowerShell wget Windows About 1,180 words

问题

直接使用wget拼接一个url地址,将会在控制台得到HTTP信息,而不是完整的文件。

PS C:\Users\fendoudebb\Desktop> wget https://unpkg.com/element-ui/lib/theme-chalk/index.css


StatusCode        : 200
StatusDescription : OK
Content           : @charset "UTF-8";.el-pagination--small .arrow.disabled,.el-table .hidden-columns,.el-table td.is-hidden>*,.el-table th.is-hidden>*,.el-table--hidden{visibility:hidden}.el-input__suffix,.el-tree.is-dra...
RawContent        : HTTP/1.1 200 OK
                    Transfer-Encoding: chunked
                    Connection: keep-alive
                    Vary: Accept-Encoding
                    Access-Control-Allow-Origin: *
                    X-Cloud-Trace-Context: 2508d4b572bce42f2bfab5db530d46da
                    Age: 583615
                    CF-Cac...
Forms             : {}
Headers           : {[Transfer-Encoding, chunked], [Connection, keep-alive], [Vary, Accept-Encoding], [Access-Control-Allow-Origin, *]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : System.__ComObject
RawContentLength  : 232432

解决

添加-OutFile属性指定保存的文件名。

wget https://unpkg.com/element-ui/lib/theme-chalk/index.css -OutFile "index.css"
Views: 5,052 · Posted: 2020-12-07

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh