LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

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 counting mode.
--null
Use null character as line separator.
--ncols N
Width of the progress bar output.
--ascii
Use ASCII characters for the progress bar instead of unicode.
--colour COLOUR
Progress bar colour (e.g., red, green, #00ff00).
--mininterval SECONDS
Minimum display update interval (default: 0.1).

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)

Copied to clipboard
Kai