---
layout: page
category-page: intermediate
category-title: Intermediate commands
tags: basename suffix prefix name
author: Fabiano Fenini
title: basename
previous-page: pages/cmd/interm/base64.html
next-page: pages/cmd/interm/bash.html
---
The basename
command deletes any prefix ending with the last slash "/" character
present in string and also a suffix.
basename [flags] [string] [suffix]Where [flags] are the cat flags, read below for more info, the string command is the pathname and the suffix, if indicated, will be also deleted.
basename /USI/commandThe shell will output this: command