linux 如何显示一个文件的某几行(中间几行)
来源:互联网 发布:java获取浏览器语言 编辑:程序博客网 时间:2024/06/05 04:25
【一】从第3000行开始,显示1000行。即显示3000~3999行
cat filename | tail -n +3000 | head -n 1000
【二】显示1000行到3000行
cat filename| head -n 3000 | tail -n +1000
*注意两种方法的顺序
分解:
tail -n 1000:显示最后1000行
tail -n +1000:从1000行开始显示,显示1000行以后的
head -n 1000:显示前面1000行
【三】用sed命令
sed -n '5,10p' filename 这样你就可以只查看文件的第5行到第10行。
1 0
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- linux 如何显示一个文件的某几行(中间几行)
- 将apk编译到指定目录
- Linux从程序到进程
- Mysql安装好后root没有密码如何设置
- Live555学习基础类
- ubuntu GPG签名验证错误 NO_PUBKEY问题
- linux 如何显示一个文件的某几行(中间几行)
- COM与.NET调用DCOM组件
- 文本文件编码 email编码
- 我的 2014 年度小结(from cnodejs.org)
- 完全背包
- 配置EA+SVN的协同设计环境
- 术语(一)
- 试写VFL语句及网上的一些资料
- lea指令