Dies ist eine alte Version des Dokuments!
git remote update origin --prune
git clean -Xdf
## total number (in all branches) git rev-list --all | wc -l ## number per committer git shortlog -s -n --all
gcc -dM -E -x c /dev/null g++ -dM -E -x c /dev/null clang -dM -E -x c /dev/null clang++ -dM -E -x c /dev/null
# certificate has PEM format (Pretty Enhanced Mail) openssl x509 -in cert-file.pem -text -noout -fingerprint # certificate has DER format (Distinguished Encoding Rules) openssl x509 -inform der -in cert-file.cer -text -noout -fingerprint
openssl rsa -in privkey.pem -text -noout
openssl req -in csr.pem -noout -text
openssl pkcs12 -in yourP12File.pfx -clcerts -nokeys -out publicCert.pem openssl pkcs12 -in yourP12File.pfx -nocerts -out privateKey.pem
openssl genrsa -out privKey.pem openssl req -new -x509 -key privKey.pem -out cert.pem
## with AES-NI (if available) openssl speed -evp aes-256-cbc ## without AES-NI OPENSSL_ia32cap="~0x200000200000000" openssl speed -evp aes-256-cbc ## multithread openssl speed -multi 2 -evp aes-256-cbc
openssl asn1parse -in someCertOrKeyOrOther.pem
curl test.schrimpe.de -x <[protocol://][user:password@]proxyhost[:port]> | w3m -dump -T text/html # for Squid running on localhost that's: curl test.schrimpe.de -x 127.0.0.1:3128 | w3m -dump -T text/html
curl https://test.schrimpe.de/ -w %{time_connect}:%{time_starttransfer}:%{time_total}
nc -w3 -z 192.168.0.1 80 ## return code zero on success
dig somehostname.local @224.0.0.251 -p 5353
## obtain the root keys first drill -S -k /usr/local/etc/unbound/root.key kuehrmann.de ## if your resolver does not support DNSSEC use e.g. Quad9 drill -S -k /usr/local/etc/unbound/root.key kuehrmann.de @9.9.9.9
dig www.dnssec-failed.org
nmap -p- somehost.example.com
find . -name "*.cpp" -print0 | xargs -0 wc -l
find . -type l ! -exec test -e {} \; -print
# create checksums of directory tree rhash -r --md5 /backups/ > /tmp/backups.md5 rhash -r --crc32 /backups/ > /tmp/backups.sfv # check one file containing MD5 hashes rhash -c /tmp/backups.md5 # check all SFV, MD5 and SHA-256 files in directory tree rhash -cr --crc-accept=sfv,md5,sha256 /tmp/directory/
touch -a -m -t 202612180130.09 fileName.ext ## -a = accessed ## -m = modified ## -t = timestamp - use [[CC]YY]MMDDhhmm[.ss] time format
## create a 100 GiB sparse file truncate -s 100G fileName.ext ## copy sparse files (works also from/to block devices; 4k should match the block size used within you sparse file) dd if=inputSparse.ext of=outputSparse.ext bs=4096 conv=sparse
file -s /dev/sd*
## from a local disk send compressed image to remote host dd if=/dev/sda bs=1048576 | pv | lz4 | ssh user@dest.example.com "dd of=/backup/basil-sda.img.lz4" ## to a local disk receive compressed image from remote host ssh user@src.example.com "cat /backup/basil-sda.img.lz4" | lz4cat | pv | dd of=/dev/sda bs=1048576
convert big_input.tif -resize 256x256 small_output.png
## prettify XML (proper indentation) xmllint --format input_ugly.xml > output_pretty.xml ## uglify XML (remove unnecessary whitespace) xmllint --noblanks input_pretty.xml > output_ugly.xml
xxd -i someFile.bin
## create named session using the terminal emulator "screen" screen -dMS some_session_name /usr/bin/command command_args ## show PID of the "screen" session screen -lsS some_session_name | awk '/\.some_session_name\t/ {print $1}' | cut -d. -f1 ## attach to the session screen -rS some_session_name
pgrep -P 56789
## show the current history history ## determine the entry number, in this example the desired entry was #501 history -d 501
unset HISTFILE