this post was submitted on 19 Nov 2025
14 points (88.9% liked)

Linux

60128 readers
375 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

I was trying to read up on it and just based off of the manual it seems not to make sense if I'm not using --silent alongside it, but I found this one article stating otherwise: https://nrogap.medium.com/show-error-response-for-curl-64666cd64330

I can't figure out if it's just AI slop or badly researched since it doesn't even show a real URL to test the commands against.

Manual entry:


       -S, --show-error
              When used with  -s,  --silent,  it
              makes  curl  show an error message
              if it fails.

              This option is global and does not
              need  to be specified for each use
              of -:, --next.

              Providing -S, --show-error  multi‐
              ple  times  has  no  extra effect.
              Disable it again  with  --no-show-
              error.

              Example:
               curl --show-error --silent https://
example.com

              See also --no-progress-meter.

you are viewing a single comment's thread
view the rest of the comments
[–] Max_P@lemmy.max-p.me 5 points 3 weeks ago (2 children)

I've had to use that flag.

--silent is useful when you don't want the progress bar or you're piping curl into something else. I like to do curl | tar -zxv to download and decompress at the same time, I've even tar -zc | curl to upload a backup taking no disk space to do so.

The problem however is it's really silent: if it fails, it exits with a non-zero code and that's it. Great when you don't want debug info to interfere, annoying when you need to debug it.

So you can opt-in to print some errors when in silent mode, but otherwise be silent.

[–] boredsquirrel@slrpnk.net 1 points 3 weeks ago (1 children)

Sounds like tmpfs would be more reliable than streaming data directly?

[–] Max_P@lemmy.max-p.me 2 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

They're just examples of things you could pipe curl into, but no not really. If the download fails you end up with an incomplete file in your tmpfs anyway, and have to retry. Another use I have is curl | mysql to restore a database backup.

If the server supports resuming, I guess that can be better than the pipe, but that still needs temporary disk space, and downloads rarely fail. You can't corrupt downloads over HTTPS either as the encryption layer would notice it and kill the connection, so it's safe to assume if it downloaded in full, it's correct.

With downloads being IO bound these days, it's nice to not have to read it all back and write the extracted files to disk afterwards. Only writes the final files once.

That's far from the weirdest thing I've done with pipes though, I've installed Windows 11 on a friend's PC across the ocean with a curl | zstd | pv | dd, and it worked. We tried like 5 different USBs and different ISOs and I gave up, I just installed it in a VM and shipped the image.

[–] boredsquirrel@slrpnk.net 1 points 1 week ago

Just learned that you can pipe tar into any compression tool, if that is not natively supported.

It has less integrity checks but huge performance benefits for sure

[–] QuazarOmega@lemy.lol 1 points 3 weeks ago* (last edited 3 weeks ago)

So in your experience it doesn't do something more if I don't provide --silent?