美文网首页
sed/cat/ps

sed/cat/ps

作者: Marksirl | 来源:发表于2020-07-29 17:32 被阅读0次
快速删除文件注释和换行:cat file | grep -v "^$" | grep -v "#" > new file
快速替换文件内容:sed "s/tmp/data/g" file > new file
快速关闭进程:ps -ef | grep php-fpm | awk '{print $2}' | xargs sudo kill

相关文章

网友评论

      本文标题:sed/cat/ps

      本文链接:https://www.haomeiwen.com/subject/zblkrktx.html