[UP]


Manual Reference Pages  - _basename (1)

NAME

_basename(1f) - [FUNIX:FILESYSTEM] display last component of file name(s) (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
See Also

SYNOPSIS

syntax:

   _basename NAME
     or
   _basename [NAME...] [ --zero][--suffix SUFFIX]
     or
   _basename -help|-version

DESCRIPTION

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

If no NAME is specified read names from stdin.

OPTIONS

NAME(S) filenames
-s, --suffix=SUFFIX
  remove a trailing SUFFIX.
-z, --zero
  end each output line with NUL, not newline
--help display this help and exit
--version
  output version information and exit

EXAMPLES

Typical usage:

  basename /usr/bin/sort          -> "sort"
  basename -s .h include/stdio.h  -> "stdio"
  basename -s ’’ include/stdio.h  -> "stdio.h"
  basename any/str1.f90 any/str2   -> "str1" followed by "str2"

or available locally via: info ’(coreutils) basename invocation’

SEE ALSO

basename(1), basename(1), readlink(1), realpath(1)


_basename (1) March 11, 2021
Generated by manServer 1.08 from eb8306de-898d-4ec5-bd2c-65226d2b0793 using man macros.