Last active
May 20, 2021 09:36
-
-
Save guangtuan/f54c2266b61adbee56d72046f49077d5 to your computer and use it in GitHub Desktop.
global setting for local development
This file contains 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
export ES_HOME=/path/to/elasticsearch-7.12.1 | |
alias ping='ping -c 5' | |
alias wget='wget -c' | |
alias tf="tail -500f" | |
alias c="clear" | |
alias grep='grep --color=auto' | |
alias ssh="ssh -o 'ServerAliveInterval 60'" | |
alias q="exit" | |
alias untar="tar -zxvf" | |
alias del="cat /dev/null > " | |
alias pick="git cherry-pick -x " | |
function es() { | |
curr=$(pwd) | |
mode=$1 | |
case $mode in | |
"run") | |
cd $ES_HOME | |
nohup $ES_HOME/bin/elasticsearch >$ES_HOME/es.log 2>&1 & | |
cd $curr | |
;; | |
"log") | |
cd $ES_HOME | |
tail -f -n 500 $ES_HOME/es.log | |
;; | |
"stop") | |
ps -ef | grep elasticsearch | grep -v grep | awk '{print $2}' | xargs kill | |
;; | |
"st") | |
curl 'localhost:9200/_cat/indices?v' | |
;; | |
esac | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment