2022-09-30 13:11:15 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
path="$1"
|
|
|
|
shift 1
|
2023-02-07 17:19:53 +01:00
|
|
|
while [[ $path != / ]]; do
|
2023-04-12 11:37:10 +02:00
|
|
|
find "$path" -maxdepth 1 -mindepth 1 "$@"
|
|
|
|
# Note: if you want to ignore symlinks, use "$(realpath -s "$path"/..)"
|
|
|
|
path="$(readlink -f "$path"/..)"
|
2022-09-30 13:11:15 +02:00
|
|
|
done
|