Open In App

How to Hide the CURL Progress Bar

Last Updated : 06 Dec, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

CURL or client for URL is a popular command line tool for sending and obtaining data and files using the URL. CURL can easily be installed on multiple operating systems. It is also trendy and is used by lots of people around the world. But sometimes cURL’s progress bar can be annoying or might take precious screen real-estate, this can be resolved by simply hiding the curl progress bar. So, In this article, we will take a look at how to hide the CURL progress bar.

Silent Mode to Hide the CURL Progress Bar

Silent mode is the simplest way to hide the progress bar in CURL. When silent mode is used all the outputs from CURL are disabled. This is good for us as it helps us hide the progress bar. However, it also means that crucial details like errors are hidden, which can be problematic in some cases.

Step 1: Open the terminal using Ctrl+Alt+T

ter

Open Terminal

Step 2: Run the CURL command normally without any modifications, and notice a progress bar

curl -O https://www.digitalocean.com/robots.txt

def

Default output of cURL with progress bar

Step 3 : Now, run the CRL command with the -s flag or –silent flag to silence errors and the progress bar

curl -O -s https://www.digitalocean.com/robots.txt

s

-s Flag used to silence cURL output

Silent + Show Error Mode to Hide the CURL Progress Bar

As we discussed in Method 1, using silent mode alone is not a good idea. Using silent mode and show error mode is a good way to overcome this limitation. In this way, we are still able to hide the progress bar and still retain access to any errors that might appear.

Step 1: Open the terminal using Ctrl+Alt+T

ter

Open Terminal

Step 2: Run the CURL command normally without any modifications, and notice a progress bar

curl -O https://www.digitalocean.com/robots.txt



def

Default output of cURL with progress bar

Step 3 : Now, run the CURL command with the -s flag and -S flag to silence the progress bar while retaining errors

curl -O -sS https://www.digitalocean.com/robots.txt



sS

Using -sS flag with cURL to disable progress and maintain errors

Disable the progress bar for Hiding the CURL Progress Bar

A new feature that was added in CURL 7.67 was the –no-progress-meter flag, to allow users to disable just the progress bar using a simple flag. Before this users had to use combinations shown above, to sort of circumvent the problem. But now with CURL 7.67 onward, disabling the progress bar is as simple as adding a flag.

Step 1: Open the terminal using Ctrl+Alt+T

ter

Open Terminal

Step 2: Run the CURL command normally without any modifications, and notice a progress bar

curl -O https://www.digitalocean.com/robots.txt



def

Default output of cURL with progress bar

Step 3 : Now, run the CURL command with the –no-progress-meter flag to disable the progress bar

curl -O --no-progress-meter https://www.digitalocean.com/robots.txt



no

Using –no-progress-meter flag to disable the progress bar

Redirect to the null device to Hide the CURL Progress Bar

Apart from these standard methods involving flags, we also have another way to use CURL without a progress bar, for this, we can redirect the curl output to the null device or /dev/null. When this method is used the progress bar also gets hidden.

Step 1: Open the terminal using Ctrl+Alt+T

ter

Open Terminal

Step 2: Run the CURL command normally without any modifications, and notice a progress bar

curl -O https://www.digitalocean.com/robots.txt



def

Default output of cURL with progress bar

Step 3: Now, redirect the CURL command outputs to null device /dev/null and notice how it removes the progress bar

curl -O https://www.digitalocean.com/robots.txt 2>/dev/null



null

Redirect cURL to the null device

Conclusion

CURL is a very popular tool and its features have been increasing over the years. Especially when it comes to basic things like hiding a progress bar, we now have multiple ways to do so. It’s never been easier than this, overall it’s relatively simple to hide the progress bar in cURL and save that precious real estate and mental peace.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads