Files
bare-operating-system/packages/bare-os-coreutils/man/pages/basename.json
T
2026-04-03 22:34:08 -04:00

28 lines
848 B
JSON

{
"name": "basename",
"section": 1,
"title": "strip directory and suffix from pathnames",
"synopsis": ["basename [OPTION]... [OPERAND]..."],
"description": "Prints the last path component. Supports multiple paths with -a, suffix removal with -s or a second operand.",
"options": [
{ "flag": "-a, --multiple", "meaning": "Treat every operand as a path" },
{ "flag": "-s SUFFIX, --suffix", "meaning": "Remove trailing SUFFIX from basename" }
],
"keywords": ["basename", "bare-os", "coreutils"],
"examples": [
{
"caption": "strip directory",
"code": "basename /home/user/docs/readme.md"
},
{
"caption": "strip suffix",
"code": "basename -s .md /path/readme.md"
},
{
"caption": "several paths",
"code": "basename -a /a/x /b/y"
}
],
"listCategory": "coreutils"
}