linux配置文件怎么查看行数?

2025-03-25 10:30:42
推荐回答(1个)
回答1:

1、vim 打开配置文件,执行
: set nu
命令即会添加行号。
2、统计行数
cat /etc/passwd| wc -l
/etc/passwd是例子,可以是其它的文件。