From 01661e9bba239d73390c142097b5344f09640bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20AKY=C3=9CZ?= Date: Fri, 20 Oct 2023 00:54:21 +0300 Subject: [PATCH] improve find command --- .local/bin/fixnames | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/fixnames b/.local/bin/fixnames index 4259de18..13ac6ed9 100644 --- a/.local/bin/fixnames +++ b/.local/bin/fixnames @@ -2,7 +2,7 @@ [ "$(id -u)" = "0" ] && echo "This script should not be run as root" >&2 && exit 1 -find . -depth -type d -path '*/.*' -prune -o -print0 | xargs -0 -P 0 -I {} dash -c ' +find . -depth \( -path '*/.*' -o -path '*/.*/*' \) -prune -o \( -type f -o -type d \) -print0 | xargs -0 -P 0 -I {} dash -c ' base="${1##*/}" path="${1%/*}"