Basename

basename returns the name of a file, minus the directories leading up to it.

For example:

 

basename retains the part removed by dirname.

Provided by
Most (all?) Linux distributions incorporate this from the GNU Coreutils: and use its man page

Related Commands

 * dirname - get the directory part of a pathname.
 * pathchk - check for strange names
 * mktemp - Create a temporary