basename(1) minix man page | unix.com

Man Page: basename

Operating Environment: minix

Section: 1

BASENAME(1)						      General Commands Manual						       BASENAME(1)

NAME
basename, dirname - strip off file prefixes and suffixes
SYNOPSIS
basename file [suffix] dirname file
OPTIONS
(none)
EXAMPLES
basename /user/ast/file.c # Strips path to yield file.c basename /user/file.c .c # Strips path and .c to yield file dirname /user/file.c # Strips basename to yield /user
DESCRIPTION
Basename removes the initial directory names (if any) yielding the name of the file itself. If a second argument is present, it is inter- preted as a suffix and is also stripped, if present. Dirname removes the final component of a path, yielding the directory a file is in. These programs are primarily used in shell scripts. BASENAME(1)
Related Man Pages
dirname(3) - linux
basename(3) - centos
dirname(3) - centos
dirname(1) - osx
basename(1) - freebsd
Similar Topics in the Unix Linux Community
search and Replace
this helps me out big time
reverse of basename
Reading files of different type and same basename
Basename for directory variable