Debian Codegraph @

upstream/fedora-44/man1/basename.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
2 .TH BASENAME "1" "March 2026" "GNU coreutils 9.10" "User Commands"
3 .SH NAME
4 basename \- strip directory and suffix from filenames
5 .SH SYNOPSIS
6 .B basename
7 \fI\,NAME \/\fR[\fI\,SUFFIX\/\fR]
8 .br
9 .B basename
10 \fI\,OPTION\/\fR... \fI\,NAME\/\fR...
11 .SH DESCRIPTION
12 .\" Add any additional description here
13 .PP
14 Print NAME with any leading directory components removed.
15 If specified, also remove a trailing SUFFIX.
16 .PP
17 Mandatory arguments to long options are mandatory for short options too.
18 .TP
19 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#basename-a'\fB\-a, \-\-multiple\fP\X'tty: link'
20 support multiple arguments and treat each as a NAME
21 .TP
22 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#basename-s'\fB\-s, \-\-suffix=\,SUFFIX\fP\X'tty: link'\/\fR
23 remove a trailing SUFFIX; implies \fB\-a\fR
24 .TP
25 \X'tty: link https://www.gnu.org/software/coreutils/manual/coreutils.html#basename-z'\fB\-z, \-\-zero\fP\X'tty: link'
26 end each output line with NUL, not newline
27 .TP
28 \X'tty: link https://www.gnu.org/software/coreutils/basename#basename--help'\fB\-\-help\fP\X'tty: link'
29 display this help and exit
30 .TP
31 \X'tty: link https://www.gnu.org/software/coreutils/basename#basename--version'\fB\-\-version\fP\X'tty: link'
32 output version information and exit
33 .SH EXAMPLES
34 .TP
35 basename /usr/bin/sort
36 \-> "sort"
37 .TP
38 basename include/stdio.h .h
39 \-> "stdio"
40 .TP
41 basename \-s .h include/stdio.h
42 \-> "stdio"
43 .TP
44 basename \-a any/str1 any/str2
45 \-> "str1" followed by "str2"
46 .SH AUTHOR
47 Written by David MacKenzie.
48 .SH "REPORTING BUGS"
49 Report bugs to: bug\[email protected]
50 .br
51 GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
52 .br
53 General help using GNU software: <https://www.gnu.org/gethelp/>
54 .br
55 Report any translation bugs to <https://translationproject.org/team/>
56 .SH COPYRIGHT
57 Copyright \(co 2026 Free Software Foundation, Inc.
58 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
59 .br
60 This is free software: you are free to change and redistribute it.
61 There is NO WARRANTY, to the extent permitted by law.
62 .SH "SEE ALSO"
63 \fBdirname\fP(1), \fBreadlink\fP(1)
64 .PP
65 .br
66 Full documentation <https://www.gnu.org/software/coreutils/basename>
67 .br
68 or available locally via: info \(aq(coreutils) basename invocation\(aq