TSORT(1) General Commands Manual TSORT(1)

# [NAME](#NAME)

tsort - Topological sort the strings in FILE. Strings are defined as any sequence of tokens separated by whitespace (tab, space, or newline), ordering them based on dependencies in a directed acyclic graph (DAG). Useful for scheduling and determining execution order. If FILE is not passed in, stdin is used instead.

# [SYNOPSIS](#SYNOPSIS)

**tsort** \[OPTIONS] FILE

# [DESCRIPTION](#DESCRIPTION)

Topological sort the strings in FILE. Strings are defined as any sequence of tokens separated by whitespace (tab, space, or newline), ordering them based on dependencies in a directed acyclic graph (DAG). Useful for scheduling and determining execution order. If FILE is not passed in, stdin is used instead.

# [OPTIONS](#OPTIONS)

[**-h**, **--help**](#h)

Print help

[**-V**, **--version**](#V)

Print version

# [VERSION](#VERSION)

v(uutils coreutils) 0.12.0

2026-09-17

---

Document: tsort(1) from uutils 0.12.0-r0 (Chainguard OS)
Source: https://github.com/uutils/coreutils
