Forrest logo
tool overview
On this page you find all important commands for the CLI tool basename. If the command you are looking for is missing please ask our AI.

basename

basename is a command-line utility that strips directory and trailing suffix from given file names.

List of commands for basename:

  • basename:tldr:9ef07 basename: Show only the file name from a path.
    $ basename ${filename}
    try on your machine
    explain this command
  • basename:tldr:bb58c basename: Show only the file name from a path, with a suffix removed.
    $ basename ${filename} ${suffix}
    try on your machine
    explain this command
tool overview