【小技能】积累小能手
1.修改windows文件扩展名:
cmd--->control folders--->查看--->取消“隐藏已知文件类型的扩展名”前面的勾--->确定
2.linux 替换多级目录下文件内容
find -type f -name "*" | xargs sed -i 's#new#old#g';
sed -i 's#old#new#g' `find -type f -name "*"`;
sed -i 's#old#new#g' $(find -type f -name "*");
find -type f -name "*" -exec sed -i 's#old#new#g' {} \;
不包含隐藏文件和指定目录:
find -type f -name "*" |grep -v '^\./\.'|grep -v src|xargs sed -i 's/old/new/g'
3.linux 多级目录,替换目录名和文件名
rename oldreplaceKey newreplaceKey ./*/*/*/*/*
4.cp带权限复制
cp -p 把源文件或目录下的所具有的权限一同复制 到 目标目录或文件
5.openvpn链接报错:All TAP-Windows Adapters On This System Are Currently In Use
https://www.jianshu.com/p/7f05a0735280
6. dos2unix命令
安装 yum install dos2unix -y
批量dos2unix:find -type f | xargs dos2unix -o

浙公网安备 33010602011771号