LinuxCommandLibrary

tqdm

Add progress bars to command pipelines

TLDR

Add progress bar to pipeline

$ cat [file] | tqdm --bytes | wc -l
copy
With estimated total
$ cat [file] | tqdm --total [1000] | process
copy
Custom unit
$ cat [files] | tqdm --unit files | process
copy
Write to file
$ cat [input] | tqdm > [output]
copy
With description
$ seq [100] | tqdm --desc "[Processing]" | process
copy

SYNOPSIS

tqdm [--total n] [--unit name] [--desc text] [options]

DESCRIPTION

tqdm (from Arabic "taqaddum" meaning progress) adds progress bars to command-line pipelines by wrapping standard input/output streams. It displays real-time statistics including iteration speed, elapsed time, and estimated time remaining.
The tool works as both a CLI pipe wrapper and a Python library. In CLI mode, it counts lines or bytes passing through and renders a visual progress bar on stderr. When --total is specified, it shows a percentage-based progress bar; otherwise it displays a simple counter with speed estimation.

PARAMETERS

--total N

Expected iterations.
--unit NAME
Unit name.
--desc TEXT
Description prefix.
--bytes
Byte mode.
--null
Null separator.

CAVEATS

Python required. stderr output. May slow pipelines slightly.

HISTORY

tqdm (from Arabic for "progress") was created as a fast, extensible progress bar for Python and CLI.

SEE ALSO

pv(1), progress(1), bar(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community