How To Install Dirname?
Maintainer: Michael Stone
Email: [email protected] .
Website: https://gnu.org/software/coreutils
Section: utils
Install dirname
-
Debian
apt-get install coreutilsClick to copy -
Ubuntu
apt-get install coreutilsClick to copy -
Alpine OS
apk add coreutilsClick to copy -
Arch Linux
pacman -S coreutilsClick to copy -
Kali Linux
apt-get install coreutilsClick to copy -
CentOS
yum install coreutilsClick to copy -
Fedora
dnf install coreutilsClick to copy -
Raspbian
apt-get install coreutilsClick to copy -
macOS
brew install coreutilsClick to copy
Calculates the parent directory of a given file or directory path.
How to use dirname?
Below are few example commands for dirname that you can use in the terminal.
Calculate the parent directory of a given path:dirname path/to/file_or_directoryClick to copyCalculate the parent directory of multiple paths:dirname path/to/file_a path/to/directory_bClick to copyDelimit output with a NUL character instead of a newline (useful when combining with `xargs`):dirname --zero path/to/directory_a path/to/file_bClick to copy
Install the latest version of dirname in Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS from terminal. To install the dirname just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of dirname from the respository and install it in your computer/server.




