$manlookup

basename

(1)

strip directory and suffix from filenames

User commands5 optionscoreutils 9.7-3
basename NAME [SUFFIX] basename OPTION... NAME...

Options

5
-a--multiple

support multiple arguments and treat each as a NAME

-s--suffixSUFFIX

remove a trailing SUFFIX; implies -a

-z--zero

end each output line with NUL, not newline

--help

display this help and exit

--version

output version information and exit

DESCRIPTION

Print NAME with any leading directory components removed. If specified, also remove a trailing SUFFIX.

Mandatory arguments to long options are mandatory for short options too.

support multiple arguments and treat each as a NAME
remove a trailing SUFFIX; implies -a
end each output line with NUL, not newline
display this help and exit
output version information and exit

EXAMPLES

AUTHOR

Written by David MacKenzie.

REPORTING BUGS

GNU coreutils online help: https://www.gnu.org/software/coreutils/
Report any translation bugs to https://translationproject.org/team/

See also