find links to target

master
zeus 2020-07-16 14:26:12 +02:00
parent 36c529d46b
commit 16e609a7e3
1 changed files with 3 additions and 0 deletions

View File

@ -2,3 +2,6 @@
# find single biggest file in an installed deb-pkg: # 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- 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"