Search code examples
bashcurlrm

How to prevent rm from reporting that a file was not found in CURL?


When executing the command

curl  -k HOST --user user:pass -Q "rm nosuch"

I get an answer

curl: (21) rm command failed: No such file or directory

I tried using -f, but the result hasn't changed

curl -f -k HOST --user user:pass -Q "rm -f nosuch"

curl: (21) rm command failed: No such file or directory

How do I exclude a message?


Solution

  • You can use:

    curl -s, --silent
    

    See curl - man