---
name: "uu-dirname"
section: "1"
platform: "linux"
package: "uutils-coreutils"
version: "0.12.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/uu-dirname"
---

# uu-dirname(1)

Strip last component from file name

## NAME

dirname - Strip last component from file name

## SYNOPSIS

**dirname** \[OPTION\] NAME...

## DESCRIPTION

Strip last component from file name

## OPTIONS

- **-z**, **--zero**

  separate output with NUL rather than newline

- **-h**, **--help**

  Print help

- **-V**, **--version**

  Print version

## EXTRA

Output each NAME with its last non-slash component and trailing slashes removed; if NAME contains no /'s, output '.' (meaning the current directory).

## VERSION

v(uutils coreutils) 0.12.0
