basename is a command-line utility that strips directory and trailing suffix from given file names. Using the basename Command # The basename command supports two syntax formats: basename NAME [SUFFIX] basename OPTION… NAME… basename takes a filename and prints the last component of the filename. Optionally, it can also remove any trailing suffix. It is