第二章:常用命令
1、cat
cat -s //多个空白行压缩成一个 cat *.txt | tr -s //移除空白行 cat -n //加行号2、find
沿着文件层次结构向下遍历,匹配符合条件的文件,并执行相应的操作。
eg:
find ./ ! -name "*.txt" -print[root@localhost program_test]# find ./ -type f -name "*.swp" -delete3、xargs 将标准输入数据转换成命令行参数。
[root@localhost program_test]# cat out.txt | xargs //将单行转化为多行[root@localhost program_test]# cat out.txt | xa继续阅读与本文标签相同的文章
-
一个换行符引发的思考!
2026-05-24栏目: 教程
-
Linux基础命令---mysqladmin数据库管理工具
2026-05-24栏目: 教程
-
【阿里云新品发布·周刊】第17期:App Hub重磅发布,打造云原生“高速公路”上的应用加油站
2026-05-24栏目: 教程
-
5分钟快速安装ASP.NET Core 网站运行环境
2026-05-24栏目: 教程
-
JSON数据构造及解析详解
2026-05-24栏目: 教程
