Linux维护-CAT命令基础
来源:互联网 发布:淘宝上的川味小吃店铺 编辑:程序博客网 时间:2024/06/14 14:33
语法:
[root@vm1 tmp]# cat --help
Usage: cat [OPTION]... [FILE]...
Concatenate FILE(s), or standard input, to standard output.
-A, --show-all equivalent to -vET
-b, --number-nonblank number nonempty output lines
-e equivalent to -vE
-E, --show-ends display $ at end of each line
-n, --number number all output lines
-s, --squeeze-blank suppress repeated empty output lines
-t equivalent to -vT
-T, --show-tabs display TAB characters as ^I
-u (ignored)
-v, --show-nonprinting use ^ and M- notation, except for LFD and TAB
--help display this help and exit
--version output version information and exit
With no FILE, or when FILE is -, read standard input.
Examples:
cat f - g Output f's contents, then standard input, then g's contents.
cat Copy standard input to standard output.
Report cat bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'cat invocation'
[root@vm1 tmp]#
示例:
[root@vm1 tmp]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
jps:x:500:500:jiapeisi1:/home/jps:/bin/bash
www:x:501:501::/home/www:/bin/bash
mysql:x:502:502::/home/mysql:/bin/bash
[root@vm1 tmp]# cat /etc/group
root:x:0:root
bin:x:1:root,bin,daemon
jps:x:500:
www:x:501:
mysql:x:502:
[root@vm1 tmp]# cat /etc/passwd | grep mysql
mysql:x:502:502::/home/mysql:/bin/bash
[root@vm1 tmp]# cat /etc/passwd | grep -v mysql
root:x:0:0:root:/root:/bin/bash
sync:x:5:0:sync:/sbin:/bin/sync
jps:x:500:500:jiapeisi1:/home/jps:/bin/bash
www:x:501:501::/home/www:/bin/bash
mailman:x:41:41:GNU Mailing List Manager:/usr/lib/mailman:/sbin/nologin
nagios:x:503:503::/home/nagios:/bin/bash
[root@vm1 tmp]# cat /etc/passwd|grep -v nologin|grep -v halt|grep -v shutdown|awk -F":" '{ print $1"|"$3"|"$4 }'|more
root|0|0
sync|5|0
jps|500|500
www|501|501
mysql|502|502
nagios|503|503
[root@vm1 tmp]# cat /etc/passwd|awk -F":" '{ print $1 }'|more
root
bin
jps
www
mysql
- Linux维护-CAT命令基础
- Linux命令基础4-cat命令
- Linux RHCS 基础维护命令
- Linux基础命令之cat使用方法大全
- linux命令------cat命令
- linux命令:cat 命令
- linux cat 命令详解
- linux cat命令
- Linux命令之:cat
- linux cat命令
- linux命令温故而知新:cat
- linux cat 命令详解
- linux cat 命令详解
- linux cat 命令详解
- linux cat 命令详解
- linux cat 命令详解
- Linux cat命令详解
- linux cat 命令详解
- 手机分辨率基础知识
- python数据结构与算法 39 树的遍历
- swift 学习资源 大集合
- 今天,我在CSDN开通博客。
- 散布着空字符串,找出给定字符串的位置
- Linux维护-CAT命令基础
- sp<> wp<>
- 我就是爱你 爱着你
- android apk 代码混搅
- C++11智能指针的选择使用
- Redis监控方案
- 湘潭邀请赛——Alice and Bob
- 【开发小谈】Activity切换动画 android界面切换动画 手机切换动画(二)
- java List 排序问题