You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://curl.haxx.se/docs/manpage.html says that -Q will abort if a command fails. Later, it says "When speaking to an FTP server, prefix the command with an asterisk (*) to make curl continue even if the command fails as by default curl will stop at first failure." For my use case, an asterisk does the same using SFTP and it does for FTP.
For reasons I won't go into, I must remove a file before transferring a new file, so, my command looks like this:
If /tmp/file1 does not exist, I can see the attempted unlink and that the transfer is done.
I expected the following
I hope that this is not an accident and that it is intentional that -Q '*... means the same for SFTP as it does for FTP. In other words, can I depend that putting a * in front of rm will ignore any error.
I did this
https://curl.haxx.se/docs/manpage.html says that -Q will abort if a command fails. Later, it says "When speaking to an FTP server, prefix the command with an asterisk (*) to make curl continue even if the command fails as by default curl will stop at first failure." For my use case, an asterisk does the same using SFTP and it does for FTP.
For reasons I won't go into, I must remove a file before transferring a new file, so, my command looks like this:
curl -s -T file1 sftp://user@host/tmp/file1 -Q '*rm /tmp/file1'
If /tmp/file1 does not exist, I can see the attempted unlink and that the transfer is done.
I expected the following
I hope that this is not an accident and that it is intentional that -Q '*... means the same for SFTP as it does for FTP. In other words, can I depend that putting a
*
in front ofrm
will ignore any error.curl/libcurl version
curl 7.64.1 (x86_64-pc-cygwin) libcurl/7.64.1 OpenSSL/1.1.1b zlib/1.2.11 libidn2/2.0.4 libpsl/0.18.0 (+libidn2/2.0.2) libssh/0.8.7/openssl/zlib nghttp2/1.37.0
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS Debug GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz Metalink NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP TrackMemory UnixSockets
operating system
Cygwin running under Windows 10
CYGWIN_NT-10.0 3.0.7(0.338/5/3) 2019-04-30 18:08 x86_64 Cygwin
The text was updated successfully, but these errors were encountered: