Created
May 11, 2020 16:37
-
-
Save wheelq/267ebc93bb25429a3a2efb95c6288d1c to your computer and use it in GitHub Desktop.
Aliases for DNS, find files and ssh-keygen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias dns="scutil --dns | grep 'nameserver\[[0-9]*\]'" | |
alias ffile='function __ffile(){if [ -z $2 ]; then _loc=".";else _loc="${2}";fi; if [ -z $1 ]; then echo "use: ffile [filename] [path]";else find "${_loc}" -type f -iname "*$1*" 2>/dev/null;unset -f __ffile;fi }; __ffile' | |
alias create-ssh-key='function _create(){SUFFIX=$(date +%Y%m%d_%H%M%S);ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519_${SUFFIX}_wheelq -C "id_ed25519_${SUFFIX}_wheelq"; unset -f _create;echo -e "Key: ${HOME}/.ssh/id_ed25519_${SUFFIX}_wheelq\n\n$(cat ${HOME}/.ssh/id_ed25519_${SUFFIX}_wheelq.pub)"};_create' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment