bashrc配置备份

#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 1 2
#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
}
#as -o hello.o hello.s
#ld -o hello.exe hello.o ...libraries...
# g++ -o myprog file1.cpp file2.cpp 
#gcc -c fn1.c fn2.c     
#ar rcs static.a fn1.o fn2.o
#nm static.a
#ar -t static.a 
#clang -o execute main.c fn1.c fn2.c
#gcc -o execute main.c static.a静态库
#gcc -o execute main.c -L<path-to-library> -lstatic连接静态库
#gcc -o execute main.c -L/data/data/com.termux/files/home -lstatic  
#libstatic.so共享对象
#gcc -Wall -fPIC -c fn1.c fn2.c
#gcc -shared -W -o libshared.so fn1.o fn2.o
#gcc -Wall -o driver main.c -L<path-to-library> -lshared
#libshared.so
#ldd driver
#export LD_LIBRARY_PATH=<path-to-library>:$LD_LIBRARY_PATH
#./driver
#y="${x%.*}"".o"   //取头
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值