dirname
Command: Extracting Directory Names
Summary
The dirname
command extracts the directory portion of a given file name or path. It's useful for scripts where you need to work with the directory containing a file, rather than the file itself.