O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

basename

Synopsis

                  basename 
                  name [suffix]
basename 
                  option
               

Remove leading directory components from a path. If suffix is given, remove that also. The result is printed to standard output.

Options

--help

Print help message and then exit.

--version

Print the version number and then exit.

Examples

                  basename /usr/lib/libm.a
libm.a

% basename /usr/lib/libm.a .a
libm

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required