TOOL » LINUX » PACKAGE

Dirname

Usage

Get the path without filename from a path.

shell
dirname relative/path/file.txt
# relative/path

To get only the filename check basename.

TIP

If using fish, you may also use path dirname.