improve find command

This commit is contained in:
Emre AKYÜZ 2023-10-20 00:54:21 +03:00 committed by GitHub
parent a06fe894c9
commit 01661e9bba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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%/*}"