From 16e609a7e3b48e05102905430a4cae8e8a4627fa Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 16 Jul 2020 14:26:12 +0200 Subject: [PATCH] find links to target --- oneliners.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oneliners.sh b/oneliners.sh index e8b7d48..c76fc9c 100644 --- a/oneliners.sh +++ b/oneliners.sh @@ -2,3 +2,6 @@ # find single biggest file in an installed deb-pkg: export PKG=vim; for i in $(dpkg -L PKG) ; do if [[ -f "$i" ]] && [[ ! -L "$i" ]]; then ls -lh1 $i ;fi; done | sort -k 5 -hr | head -1 | cut -d " " -f 5,9- + +# find all links in the fs, that link to a specific target: +find / -type l -exec readlink -nf {} ';' -exec echo " -> {}" ';' | grep "/bin/bash"