Scripts

Oneliners

Misc Oneliners set default branch to main git config --global init.defaultBranch main bash - check multiple files [ -f /etc/resolv.conf -a -f /etc/hosts ] && echo "Both files exist" || echo "One or Both Files are missing" remove word ’nosuid’ on the line /var in /etc/fstab sed -E -i.bak 's/(.*\/var.*)(,nosuid)(.*)/\1\3/' /etc/fstab macos show hidden files defaults write com.apple.finder AppleShowAllFiles -boolean true; killall Finder or CMD + SHIFT + . macos hide hidden files defaults write com.

Aslo - AS Lookup

ASLO AS Lookup Helper Script. It’s written for OpenBSD and need’s some modification for Linux. It basically depends on Python, PIP Installer and Python Package “aslookup”. Have Fun ! Download wget https://blog.stoege.net/scripts/aslo chmod 755 aslo ./aslo 1.1.1.1 Script … and the Content himelf. It basically check’s if pip is installed, if as-lookup is installed, and then does the as lookup for the given IP Adress #!/usr/bin/env bash # AS Lookup for IP Address install_pip() { echo -e "\npip not found, install ?

Bigdata

How to Process Large Files … ? Large is a variable Term, 700 GB is large for me, while it could be a small peace for others. Assuming you need to count the lines … this simple Task can take minutes ! Size [user@host /tmp]$ du -sh bigfile 745G bigfile Wordcount -> 10 min if you need to count the lines, use the wordcount command and you get the exact number … but you have to wait for minutes, depending in your disk subsystem and the file size of course