Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Basename
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Shell command for extracting the last name from a path}} {{lowercase}} {{Infobox software | name = basename | logo = | screenshot = | screenshot size = | caption = | developer = | released = {{Start date and age|1979|1}} | latest release version = | latest release date = | programming language = [[C (programming language)|C]] | operating system = [[Unix]], [[Unix-like]], [[Plan 9 from Bell Labs|Plan 9]], [[Inferno (operating system)|Inferno]] | platform = [[Cross-platform]] | genre = [[Command (computing)|Command]] | license = [[coreutils]]: [[GPLv3+]]<br />Plan 9: [[MIT License]] | website = }} '''<code>basename</code>''' is a [[shell (computing)|shell]] [[command (computing)|command]] for extracting the last name of a [[file path]]. The command was introduced in [[X/Open]] Portability Guidelines issue 2 of 1987. It was inherited into the first version of [[POSIX]] and the [[Single Unix Specification]].<ref>{{man|cu|basename|SUS}}</ref> It first appeared in 4.4BSD.<ref>{{man|1|basename|FreeBSD}}</ref> The version in [[GNU Core Utilities]] was written by David MacKenzie.<ref>{{man|1|basename|Linux}}</ref> The command is available for [[Windows]] as part of the [[GnuWin32]] project<ref>[http://gnuwin32.sourceforge.net/packages/coreutils.htm CoreUtils for Windows]</ref> and [[UnxUtils]].<ref>[http://unxutils.sourceforge.net/ Native Win32 ports of some GNU utilities]</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)