basename(1)

NAME
basename - Print NAME with any leading directory components removed If specified, also remove a trailing SUFFIX

SYNOPSIS
basename [-a|--multiple] [-s|--suffix] [-z|--zero] [-h|--help] [-V|--version] [name]

DESCRIPTION
Print NAME with any leading directory components removed If specified, also remove a trailing SUFFIX

OPTIONS

-a, --multiple
    support multiple arguments and treat each as a NAME

-s, --suffix <SUFFIX>
    remove a trailing SUFFIX; implies -a

-z, --zero
    end each output line with NUL, not newline

-h, --help
    Print help

-V, --version
    Print version

EXTRA
## Examples Show only the file name from a path: basename {{path/to/file}} Show only the rightmost directory name from a path: basename {{path/to/directory}} Show only the file name from a path, with a suffix removed: basename {{path/to/file}} {{suffix}} > The examples are provided by the [tldr-pages project](https://tldr.sh) under the [CC BY 4.0 License](https://github.com/tldr-pages/tldr/blob/main/LICENSE.md). > > Please note that, as uutils is a work in progress, some examples might fail.

VERSION
v(uutils coreutils) 0.6.0