2020-07-09 16:47:00 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# 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-
|
2020-07-16 14:26:12 +02:00
|
|
|
|
|
|
|
# find all links in the fs, that link to a specific target:
|
|
|
|
find / -type l -exec readlink -nf {} ';' -exec echo " -> {}" ';' | grep "/bin/bash"
|
2020-07-16 14:28:49 +02:00
|
|
|
|
|
|
|
# extract base64-coded binary within a given tag in an xml (1st match)
|
|
|
|
cat file.xml | sed -n -e 's/.*<ns5\:Daten\ xmime\:contentType\=\"application\/pdf\">\(.*\)<\/ns5:Daten>.*/\1/p' | base64 -d
|
2020-08-03 13:09:03 +02:00
|
|
|
|
|
|
|
# prettify PATH-Output:
|
|
|
|
echo $PATH | sed s/\:/\\n/g
|