菜鸟学Linux 第007篇笔记 简单命令的使用讲解(文本、时间、目录)
2016-09-27 14:53
711 查看
Linux 发行版
Fedora, RedHat(CentOS), SUSU, Debian(Ubuntu, Mint), Gentoo, LFS(Linux From Scratch)
Command
目录管理(先前节数已经讲)
ls、cd、pwd、mkdir、rmdir、tree
文件管理(先前节数已经讲)
touch、stat、file、rm、cp、nano、mv
日期时间(先前节数已经讲)
date、clock、hwclock、cal
查看文本
cat、tac、more、less、head、tail
文本处理
cut、join(用得不多)、sed、awk
文本排序
sort、uniq
文本统计
wc
字符处理
tr
detail of Command
查看文本
cat concatenate(V.连接) files and print on the standard output
-n number all output lines
-A --show-all
-E display $ at end of each line 行结束符
tac concatenate and print files in reverse(反转)
more file perusal filter for crt viewing(和less区别到end会退出而less不会)
less opposite of more
head output the first part of files
tail output the last part of files
-f output appended data as the file grows; -f, --follow, and --fol-
low=descriptor are equivalent 查看文件尾部,等待显示后续追加内容
head/tail -n output the first/last N lines
文本处理
cut remove sections from each line of files
-d use DELIM instead of TAB for field delimiter(定界符)
-f select only these fields;
文本排序
sort sort lines of text files
-n compare according to string numerical value
-r reverse the result of comparisons(比较)
-t use SEP instead of non-blank to blank transition(字段分隔符)
-k start a key at POS1, end it at POS2 (origin 1)(从哪里开始排序)
-u 去除重复 with -c, check for strict ordering; without -c, output
only the first of an equal run
-f fold lower case to upper case characters(折叠大小写 按字翻译哈哈)
uniq report or omit repeated lines(显示相邻重复的行)
-d only print duplicate(重复) lines
-c prefix(前缀) lines by the number of occurrences 显示重复行次数
文本统计
wc print the number of newlines, words, and bytes in files
-c print the byte counts
-l print the newline counts
-w print the word counts
-L print the length of the longest line
字符处理
tr translate or delete characters
用法示例: tr 'a-z' 'A-z' < /etc/passwd 将此文件里的小字转换为大写 <此符号以后会讲
-d delete characters in SET1, do not translate
Ctrl+c 中断当前程序
Shift+Page up/down 在终端里翻页(有限会有一部分被删除)
Fedora, RedHat(CentOS), SUSU, Debian(Ubuntu, Mint), Gentoo, LFS(Linux From Scratch)
Command
目录管理(先前节数已经讲)
ls、cd、pwd、mkdir、rmdir、tree
文件管理(先前节数已经讲)
touch、stat、file、rm、cp、nano、mv
日期时间(先前节数已经讲)
date、clock、hwclock、cal
查看文本
cat、tac、more、less、head、tail
文本处理
cut、join(用得不多)、sed、awk
文本排序
sort、uniq
文本统计
wc
字符处理
tr
detail of Command
查看文本
cat concatenate(V.连接) files and print on the standard output
-n number all output lines
-A --show-all
-E display $ at end of each line 行结束符
tac concatenate and print files in reverse(反转)
more file perusal filter for crt viewing(和less区别到end会退出而less不会)
less opposite of more
head output the first part of files
tail output the last part of files
-f output appended data as the file grows; -f, --follow, and --fol-
low=descriptor are equivalent 查看文件尾部,等待显示后续追加内容
head/tail -n output the first/last N lines
文本处理
cut remove sections from each line of files
-d use DELIM instead of TAB for field delimiter(定界符)
-f select only these fields;
文本排序
sort sort lines of text files
-n compare according to string numerical value
-r reverse the result of comparisons(比较)
-t use SEP instead of non-blank to blank transition(字段分隔符)
-k start a key at POS1, end it at POS2 (origin 1)(从哪里开始排序)
-u 去除重复 with -c, check for strict ordering; without -c, output
only the first of an equal run
-f fold lower case to upper case characters(折叠大小写 按字翻译哈哈)
uniq report or omit repeated lines(显示相邻重复的行)
-d only print duplicate(重复) lines
-c prefix(前缀) lines by the number of occurrences 显示重复行次数
文本统计
wc print the number of newlines, words, and bytes in files
-c print the byte counts
-l print the newline counts
-w print the word counts
-L print the length of the longest line
字符处理
tr translate or delete characters
用法示例: tr 'a-z' 'A-z' < /etc/passwd 将此文件里的小字转换为大写 <此符号以后会讲
-d delete characters in SET1, do not translate
Ctrl+c 中断当前程序
Shift+Page up/down 在终端里翻页(有限会有一部分被删除)
相关文章推荐
- linux文件系统,目录管理,文件管理,日期时间,查看文本的常用命令
- linux命令之目录监控 字符串拆分 监控命令运行结果 统计行数 去除文本头尾空格 获取网卡名浮点数运算等命令使用技巧
- [linux学习笔记]第2天:时间管理,命令帮助信息,文本查看,权限及用户管理,BASH和变量,脚本
- 菜鸟学Linux 第020篇笔记 find命令使用和命令组合条件
- Linux学习【菜鸟篇】- 学习笔记- 挂载点以及vi的简单使用
- Linux 根文件系统详解 和简单命令的使用 (笔记)
- 菜鸟学Linux 第017篇笔记 sed命令的使用
- Linux 基础目录 简单命令学习操作笔记
- linux中目录信息查询ls命令的简单使用方法
- Linux 系统的简单介绍,分区讲解,查看命令,文件目录内容
- 菜鸟学Linux 第084篇笔记 lvs持久连接和awk简单使用
- 实例讲解Linux中cd命令切换目录的使用技巧
- 菜鸟学Linux 第004篇笔记 Linux时间和帮助命令
- 先简单写一个,Linux下man命令使用的一些东东
- Linux改变文件或目录的访问权限命令使用说明(chmod命令)
- 菜鸟学习linux笔记与练习-----第二天。一些基本命令以及初级网络配置
- linux下ln命令使用详解---linux连接文件或目录命令
- Linux使用time命令获取命令执行时间
- linux 目录结构+常用命令+压缩命令+vim使用+及一些基础知识(非常好)
- 菜鸟学习linux笔记与练习-----第一天。一些初级命令以及基本用户管理