basename path [suffix]Arguments explained
- Options adjust output or behavior.
- Arguments name the files, services, hosts, or values the command should work with.
Common examples
basename /var/log/syslogPrints syslog.
basename archive.tar.gz .tar.gzPrints archive.
| Field | Details |
|---|---|
| Command | basename |
| Category | Navigation |
| Primary use | Prints the final component of a path. |
| Syntax | basename path [suffix] |