1
0
Fork 0
dotfiles/.local/bin/findup
2023-04-13 10:48:36 +02:00

9 lines
228 B
Bash
Executable file

#!/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