随笔分类 - shell
摘要:添加单行 使用重定向操作符 >> 或 > echo "hello world" > test.txt # 重写 echo "hello world" >> test.txt # 追加 或者使用 tee echo "hello world" | tee -i test.txt # 重写 echo "h
阅读全文
摘要:【转载】https://www.bilibili.com/read/cv5526128/ 一、安装中文版man 官方下载地址: https://code.google.com/archive/p/manpages-zh/ GITHUB项目地址: https://github.com/man-page
阅读全文
摘要:#!/bin/sh if [ -z $1 ] || [ -z $2 ];then echo -e "usage: ./folder_save.sh [save num of int] [deal with path]" exit fi echo -e "0=$0,1=$1, 2=$2" basedi
阅读全文
摘要:#!/bin/sh ls -lrt| awk '{if(NR<4 && NR!=1) printf("rm -rf %s\n",$8)}' >rm2.sh chmod 755 rm2.sh ./rm2.sh rm rm2.sh 或 #!/bin/sh for i in `ls -lthr | hea
阅读全文

浙公网安备 33010602011771号