Command: basename - strip off file prefixes and suffixes Syntax: basename file [suffix] Flags: (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 The initial directory names (if any) are removed yielding the name of the file itself. If a second argument is present, it is interpreted as a suffix and is also stripped, if present. This program is primarily used in shell scripts.