如何使用 wget 方法删除 bash 中的所有文件

how to delete all files using wget method delete in bash

我可以在wget中使用method=DELETE删除单个文件,但是如果要删除100个文件怎么办?如何将它们全部删除?我试过 * 但不支持通配符。谢谢 :).

wget --user=xxx --password=xxx --xxx --method=DELETE \
xxxx://www.xxxx.com/xxx/xx/xxxx/myfile.foo

这取决于此操作是否已在您尝试执行该命令的域上实施。查阅该服务的 (REST ?) API,它可能在网站上有记录。

来自 Hypertext Transfer Protocol -- HTTP/1.1 的 FYI:

The DELETE method requests that the origin server delete the resource identified by the Request-URI. This method MAY be overridden by human intervention (or other means) on the origin server. The client cannot be guaranteed that the operation has been carried out, even if the status code returned from the origin server indicates that the action has been completed successfully. However, the server SHOULD NOT indicate success unless, at the time the response is given, it intends to delete the resource or move it to an inaccessible location.