From LQWiki
basename returns the name of a file, minus the directories leading up to it.
For example:
$ basename "foo/bar/baz"
baz
basename is the opposite of dirname.
basename returns the name of a file, minus the directories leading up to it.
For example:
$ basename "foo/bar/baz"
baz
basename is the opposite of dirname.