【工程实践】Linux下wc -l 命令
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
·
1.前言
模型训练前,需要统计数据量做好实验记录,之前一直使用with open()... 将数据读入内存,如果数据量大的时候使用with open()不仅读入速度慢,而且容易造成服务器内存占用过多。使用linux命令中的wc命令行可以方便的统计文件内的数据量。
2.使用
#命令行
wc -l /filepath
#参数说明
-c, --bytes:统计字节数。
-m, --chars:统计字符数。
-w, --words:统计字数。
-l, --lines:统计行数。
-L, --max-line-length:统计最长行的长度。
3.示例
![]()
A beautiful web dashboard for Linux
最近提交(Master分支:4 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐



所有评论(0)