Basename is a Unix program and part of the POSIX standard. There is the file name without the leading directory name. If a suffix is specified, the match with the file extension, and the suffix is removed.
$ Basename / home / alice / image.jpg image.jpg $ Basename / home / alice / image.jpg. Jpg image see also
- Unix commands