#nginx
#httpd
alias p='python'
alias v='vim'
#find /-iname s.h 查找于s.h文件匹配的路径
#lscpu查看系统cpu
#将为每个人提供读取、写入和执行权限
alias c7='chmod 777-R'
#授予用户读取、写入和执行权限
alias c0='chmod 700-R'
alias c3='chmod 327-R'
alias s='source .bashrc'
alias r='rm -R'
alias rmr='rm -R'
alias use='uname -a'
alias cla='clang++'
alias pth='pwd'
alias cdn='cd /data/data/com.termux/files/usr/share/nginx/html'
alias vn='v /data/data/com.termux/files/usr/etc/nginx/nginx.conf'
#p4a is python-for-android
alias p4='p4a recipes'
#p4a distributions列出可用的发行版
#创建文件
alias tx='touch'
alias e='env'
alias tre='cd /data/data/com.termux/files/home/python && python trees.py && python trees.py > ppts.txt'
alias al='apt list'
alias ai='apt install'
alias au='apt update'
alias aup='apt upgrade'
alias pipi='pip install'
alias pif='pip freeze'
alias pit='pip freeze > requirements.txt'
alias pa='python /data/data/com.termux/files/home/pathx.py'
#pip install -r requirements.txt
alias pi='pip install -r requirements.txt'
alias pk='pkg install'
alias pku='pkg update'
alias pkup='pkg upgrade'
alias cdh='cd $HOME'
alias cdh='cd $home'
alias pha='php -a'
alias ph='php -f'
alias g='go run'
alias wh='which'
alias 23='2to3 -w'
alias hm='$HOME'
alias pz='cd /data/data/com.termux/files/usr/etc'
#find /-wholename
alias fd='find /data/data/com.termux/files -name'
alias fdd='find /storage/emulated/0-name'
alias va='v /data/data/com.termux/files/usr/etc/apache2/httpd.conf'
#apache2 cgi工作目录
alias cgi='cd /data/data/com.termux/files/home/cgi-bin'
#apache2 html工作目录
alias hst='cd /data/data/com.termux/files/home/www'
#apache2
alias a2='apachectl -v'
alias cmy='cd /storage/emulated/0'
#fmy *.jpg
alias cmyp='cd /data/data/com.termux/files/home/static/images'
alias fmy='find /storage/emulated/0-name'
#apache2 路径
alias a2p='apachectl -c'
alias bins='ls /data/data/com.termux/files/usr/bin'
alias nx='nginx -t'
alias nid='netstat -ntlp|grep 8000'
alias us='ls /data/data/com.termux/files/usr'
#终端直接运行php -r '$d =date("Y-m-d H:i:s"); echo "$d\n"; '
alias w='whereis'
alias mk='mkdir'
#man查看命令的作用
alias ma='man'
#less不打开编辑器查看文件
alias le='less'
#compgen 当您需要引用所有可用的命令、别名和函数时,这是一个方便的命令。
alias ca='compgen -a'
alias cc='compgen -c'
alias cdd='compgen -d'
alias co='compgen -acd'
#head命令显示文件的前 n 行,head -n filename
alias he='head'
#tail - 读取文件末尾
#alias tail='ta'
#history 列出最近终端使用的命令
alias hi='history'
#clear 清除终端
alias cl='clear'
#查找进程id,kill — 终止停滞的进程
alias pd='ps -aux'
#只打印进程pid可以>pid.txt ps -A
#alias pid="ps -aef | grep -v grep | grep '' | awk '{print $2}'"
#ps -aef | grep '' | awk '{print $2}'
alias pt="$path"
alias rd="readlink -f"
alias pt="$PATH"
alias mip="ifconfig -a"
alias mip1="ip address show"
alias hs="hostname -i"
export LS_OPTIONS='--color=auto'
#export LS_OPTIONS='--color=never'
#eval "$(dircolors ~/.dircolors)"
eval "$(dircolors)"
#[-e ~/.dircolors ]&& eval $(dircolors -b ~/.dircolors)||
# eval $(dircolors -b)
alias lll='ls $LS_OPTIONS -alF'
alias ll='ls $LS_OPTIONS -R'
#alias l='ls $LS_OPTIONS'
alias l='ls $LS_OPTIONS -C'
alias lA='ls $LS_OPTIONS -A'
alias la='ls $LS_OPTIONS -a'
alias l1='ls $LS_OPTIONS -1'
alias lr='ls $LS_OPTIONS -R'
alias lc='ls $LS_OPTIONS -CF'
alias lf='ls $LS_OPTIONS -alF'l
#移动文件,修改文件名用mv 12
#mv *.py python
alias xg='mv'
export LS_CLORS=$LS_COLORS:'*.py=1;8:*.html=1;11:*.java=1;15:*.cc=1;20:*.js=1;23:*.json=1;26:*.h=1;27:'
#export PATH="$HOME/python/trees.py"
function c (){
x="$1"
y="${x%.*}"
z="${x#*.}"case"$z" in "cc"|"cpp")
echo "这是c++,用clang++编译好"
clang++-o "$y""$x"&&./$y
;;"c")
echo "这是c,用clang编译好"
clang -o "$y""$x"&&./$y
;;
esac
}
function j (){
x="$1"
y="${x%.*}"
javac "$x"
java "$y"}
function vs(){if"$1"--version
then
echo
elif "$1"-version
then
echo
elif "$1" version
then
echo
elif "$1"-v
then
echo
fi
}
function hl(){if"$1"--help
then
echo
elif "$1"-help
then
echo
elif "$1" help
then
echo
fi
}
function an(){
#php-fpm
nginx
httpd
python /data/data/com.termux/files/home/testpy/app/main.py
}
function pid(){
ps -ef | grep '' | awk '{print $2}'
#导出>pid.txt
}
function kt (){
x="$1"
y="${x%.*}"
z="${x#*.}"
c="$y"
d="$z"
e="${c^}""${d^}"
f=".jar"
yf="$y""$f"
kotlinc "$x"
kotlin "$e"
kotlinc -include-runtime -d "$yf""$x"
java -jar "$yf"}
#arm汇编命令aarch64平台
function hb(){
x="$1"
y="${x%.*}"".o"
z="${x%.*}"
as -o "$y""$x"&&ld -s -o "$z""$y"&&./$z
}
#nasm x64汇编命令
#nasm -f elf64 hello.asm && ld hello.o &&./a.out
function up(){if"$1" update -y&&"$1" upgrade -y
then echo
elif "$1" install --upgrade "$1"
then echo
elif pip install --upgrade "$1"
then
pip install --upgrade "$1"
echo
else echo
fi
}
function ins(){if apt install "$1"
then
apt install "$1"
echo
elif pip install "$1"
then
pip install "$1"
echo
else echo
fi
}