Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
How to Show the wget Progress Bar Only in Linux?
Remote management of UNIX/Linux/BSD servers via SSH session is a common practice. For installation, you might need to download software or other files. While Linux has several graphical download managers, the wget command-line tool is preferred for non-interactive downloads. The wget command supports various Internet protocols including HTTP, HTTPS, and FTP.
Basic Wget Usage
The simplest use of wget is downloading a single file to your current directory. Type wget followed by the file URL
$ wget https://www.tutorialspoint.com/index.htm
--2022-12-26 10:18:13-- https://www.tutorialspoint.com/index.htm Resolving www.tutorialspoint.com (www.tutorialspoint.com)... 192.229.221.69 Connecting to www.tutorialspoint.com (www.tutorialspoint.com)|192.229.221.69|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 127735 (125K) [text/html] Saving to: 'index.htm' index.htm 0%[ ] 0 --.-KB/s index.htm 100%[===================>] 124.74K --.-KB/s in 0.009s 2022-12-26 10:18:14 (12.9 MB/s) - 'index.htm' saved [127735/127735]
By default, wget displays verbose output including connection details, file size, and download progress. Sometimes you only want to see the progress bar without the extra information.
Showing Progress Bar Only
Method 1: Using --show-progress Option
For wget versions 1.16 and later, combine the -q (quiet) option with --show-progress to display only the progress bar while hiding all other output
$ wget https://www.tutorialspoint.com/index.htm -q --show-progress
index.htm 100%[===================>] 124.74K --.-KB/s in 0.03s
Method 2: Using grep Filter
For older wget versions (before 1.16) where --show-progress is not available, filter the output using grep to show only lines containing the percentage symbol
$ wget https://www.tutorialspoint.com/index.htm 2>&1 | grep '%'
0K .......... .......... .......... .......... .......... 40% 125M 0s 50K .......... .......... .......... .......... .......... 80% 6.45M 0s 100K .......... .......... .... 100% 206M=0.008s
Comparison of Methods
| Method | Wget Version | Command | Output Style |
|---|---|---|---|
| --show-progress | 1.16+ | wget -q --show-progress URL | Clean progress bar |
| grep filter | All versions | wget URL 2>&1 | grep '%' | Dot-based progress |
Additional Options
You can combine progress-only display with other useful wget options
-O filenameSpecify output filename-cContinue partial downloads--limit-rate=200kLimit download speed
$ wget -q --show-progress -c --limit-rate=200k https://example.com/largefile.zip
Conclusion
The wget command provides flexible options for displaying download progress. Modern wget versions (1.16+) offer the --show-progress option for clean progress bars, while older versions can use grep filtering. These methods help create cleaner, more focused output for automated scripts and interactive use.
