From: Ian Kelling Date: Mon, 20 Jun 2016 01:46:56 +0000 (-0700) Subject: btrfs only has 1 std dir hardlink instead of 2 X-Git-Url: https://iankelling.org/git/?p=small-misc-bash;a=commitdiff_plain;h=13cbf28d364ed1b7f43fa53e48e74ab62f0c8600;hp=66a2e479063e79809cf56314636cc6469d018b0d btrfs only has 1 std dir hardlink instead of 2 --- diff --git a/ll-function b/ll-function index 30c749e..c5ff618 100644 --- a/ll-function +++ b/ll-function @@ -56,12 +56,8 @@ ll() { hardlinks="${y#$initial_space}" # remove any initial spaces hardlinks="${hardlinks%%[[:space:]]*}" # remove everything beyond first word # ignore the hardlinks that files/dirs always have - if [[ ${line:0:1} == d ]]; then - hardlinks=$(( hardlinks - 2 )) - else - hardlinks=$(( hardlinks - 1 )) - fi - [[ $hardlinks == 0 ]] && hardlinks= + hardlinks=$(( hardlinks - 1 )) + [[ $hardlinks == 0 ]] && hardlinks= if (( ${#hardlinks} > max_hl_digits )); then max_hl_digits=${#hardlinks} fi