TOOL » LINUX » PACKAGE

Basename

Usage

Get the filename from a path.

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

To get only the path check dirname.

TIP

If using fish, you may also use path basename.