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

10 lines
219 B
Plaintext
Raw Normal View History

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
2024-01-02 19:09:46 +01: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