20、head和od

简介: 一、head与od 1、head -n 18 filename.cpp | tail -n 1 head [OPTION]... [FILE]... //output the first part of files -n, --lines=[-]N print the first N lines instead of the first 10; with the leading '-', print all but the last N lines of each file。

一、head与od

1、head -n 18 filename.cpp | tail -n 1

head [OPTION]... [FILE]... //output the first part of files

-n, --lines=[-]N

print the first N lines instead of the first 10; with the leading '-', print all but the last N lines of each file

head -n 3 filename 等价于head -n3 header.h

head --lines=5 header.h

-c //显示前n字节

-v //显示文件名

-q //不显示文件名

2、od

od(octal dump)

od - dump files in octal and other formats

od [OPTION]...[FILE]...

语法:od [-abcdfhilovx][-A <字码基数>][-j <字符数目>][-N <字符数目>][-s <字符串字符数>][-t <输出格式>][-w <每列字符数>][--help][--version][文件...]

补充说明:od指令会读取所给予的文件的内容,并将其内容以八进制字码呈现出来。【1

od常用的还是传统的命令格式

-a file //选出指字的字符显示,忽略高位

-c file //以ASCII characters or backslash escapes显示字符

-x file //以16进制显示字符

-f file //以浮点数显示字符

-d file //十进制

参考

1http://www.0djx.com/article/20100510/7204.html

目录
相关文章
|
10月前
|
编解码
|
开发工具 git 开发者
Head 使用|学习笔记
快速学习 Head 使用。
52 0
Head 使用|学习笔记
|
数据可视化 开发者
Head介绍 | 学习笔记
快速学习 Head 介绍
49 0
Head介绍 | 学习笔记
|
开发者 索引
Head 使用 | 学习笔记
快速学习 Head 使用
55 0
Head 使用 | 学习笔记
|
算法 Go
常见链表题及其 Go 实现
从链表中移除一个重复的值,链表是有序的。在一个排序的链表中,存在重复的结点,请删除该链表中重复的结点,重复的结点不保留,返回链表头指针。 例如,链表 1-&gt;2-&gt;3-&gt;3-&gt;4-&gt;4-&gt;5 处理后为 1-&gt;2-&gt;5
HDOJ/HDU 1088 Write a simple HTML Browser(HTML字符串)
HDOJ/HDU 1088 Write a simple HTML Browser(HTML字符串)
87 0

热门文章

最新文章