添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
聪明伶俐的围巾  ·  Received HTTP/0.9 ...·  昨天    · 
安静的饺子  ·  [SOLVED] Protocol ...·  昨天    · 
独立的饺子  ·  User Guide - urllib3 ...·  3 周前    · 
英姿勃勃的刺猬  ·  SN74AHC1G00-Q1 ...·  1 月前    · 
精明的日记本  ·  IntelliJ ...·  2 月前    · 

Hi all,

This is a cross post from How can I delete a file from my SFTP server using the {curl} package in R - Stack Overflow

I am trying to delete a file on an SFTP server using the curl package in R, but I fail

PackageVersion('curl'): # 5.2.0

curl::curl_fetch_memory(
  url = "sftp://username:password@server-ip-address", 
  handle = curl::new_handle() |> 
    curl::handle_setopt(
      verbose = TRUE,
      customrequest = "rm files/my_file.txt"

I also tried using customrequest = "DELETE files/my_file.txt" but nothing

To check if it works in the command line tool curl

In Powershell, the below works fine

curl sftp://username:password@server-ip-address -Q 'rm files/my_file.txt'

Any help would be appreciated