1
0
Fork 0
dotfiles/.local/bin/findup

12 lines
229 B
Plaintext
Raw Normal View History

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