Strip directory from a path
low risk
Prints the final component of a path and optionally strips a suffix.
basename /var/log/syslogprints syslog · explain & risk-check →basename archive.tar.gz .tar.gzprints archive · explain & risk-check →Reference text is hand-written and may be incomplete — check man basename for your version. Test destructive commands on a non-production system first.