Strip last component from a path
low risk
Prints the directory portion of a path (everything before the last slash); handy in scripts to locate sibling files.
dirname /var/log/syslogprints /var/log · explain & risk-check →Reference text is hand-written and may be incomplete — check man dirname for your version. Test destructive commands on a non-production system first.