ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

echo命令详解

2019-06-24 20:43:03  阅读:254  来源: 互联网

标签:errors TX RX bytes echo overruns 命令 详解 dropped


echo命令是Linux中最基础和最常用的命令,此处对echo命令的常用方法进行总结。

输入:

[root@node1 ~]# echo ifconfig

输出:

ifconfig

输入:

[root@node1 ~]# echo `ifconfig`

输出:

bond0: flags=5443<UP,BROADCAST,RUNNING,PROMISC,MASTER,MULTICAST> mtu 1500 inet 172.16.1.11 netmask 255.255.255.0 broadcast 172.16.1.255 inet6 fe80::379b:2fcf:2a40:4294 prefixlen 64 scopeid 0x20<link> ether f8:75:88:4f:37:c1 txqueuelen 1000 (Ethernet) RX packets 23834607 bytes 3045446631 (2.8 GiB) RX errors 0 dropped 5501762 overruns 0 frame 0 TX packets 11197377 bytes 1908949712 (1.7 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp2s0f0: flags=6467<UP,BROADCAST,RUNNING,PROMISC,SLAVE,MULTICAST> mtu 1500 ether f8:75:88:4f:37:c1 txqueuelen 1000 (Ethernet) RX packets 18238011 bytes 2319807642 (2.1 GiB) RX errors 0 dropped 1 overruns 0 frame 0 TX packets 319792 bytes 40208148 (38.3 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0x92f00000-92ffffff enp2s0f1: flags=6467<UP,BROADCAST,RUNNING,PROMISC,SLAVE,MULTICAST> mtu 1500 ether f8:75:88:4f:37:c1 txqueuelen 1000 (Ethernet) RX packets 5615052 bytes 734538233 (700.5 MiB) RX errors 0 dropped 1 overruns 0 frame 0 TX packets 10888928 bytes 1869951941 (1.7 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0x92e00000-92efffff enp2s0f2: flags=4355<UP,BROADCAST,PROMISC,MULTICAST> mtu 1500 ether f8:75:88:4f:37:c3 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0x92d00000-92dfffff enp2s0f3: flags=4355<UP,BROADCAST,PROMISC,MULTICAST> mtu 1500 ether f8:75:88:4f:37:c4 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0x92c00000-92cfffff enp4s0f0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500 inet 10.200.101.131 netmask 255.255.255.0 broadcast 10.200.101.255 inet6 fe80::fa75:88ff:fe87:9ba8 prefixlen 64 scopeid 0x20<link> ether f8:75:88:87:9b:a8 txqueuelen 1000 (Ethernet) RX packets 529678037 bytes 158899597018 (147.9 GiB) RX errors 0 dropped 6620845 overruns 0 frame 0 TX packets 400156944 bytes 112065246274 (104.3 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 enp4s0f1: flags=4355<UP,BROADCAST,PROMISC,MULTICAST> mtu 1500 ether f8:75:88:87:9b:a9 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1 (Local Loopback) RX packets 370521565 bytes 706047283678 (657.5 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 370521565 bytes 706047283678 (657.5 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

输入:

[root@node1 ~]# echo "`ifconfig`"

输出:

bond0: flags=5443<UP,BROADCAST,RUNNING,PROMISC,MASTER,MULTICAST>  mtu 1500
        inet 172.16.1.11  netmask 255.255.255.0  broadcast 172.16.1.255
        inet6 fe80::379b:2fcf:2a40:4294  prefixlen 64  scopeid 0x20<link>
        ether f8:75:88:4f:37:c1  txqueuelen 1000  (Ethernet)
        RX packets 23836462  bytes 3045681786 (2.8 GiB)
        RX errors 0  dropped 5502194  overruns 0  frame 0
        TX packets 11198207  bytes 1909044016 (1.7 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp2s0f0: flags=6467<UP,BROADCAST,RUNNING,PROMISC,SLAVE,MULTICAST>  mtu 1500
        ether f8:75:88:4f:37:c1  txqueuelen 1000  (Ethernet)
        RX packets 18239421  bytes 2319984808 (2.1 GiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 319817  bytes 40211248 (38.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0x92f00000-92ffffff  

enp2s0f1: flags=6467<UP,BROADCAST,RUNNING,PROMISC,SLAVE,MULTICAST>  mtu 1500
        ether f8:75:88:4f:37:c1  txqueuelen 1000  (Ethernet)
        RX packets 5615497  bytes 734596222 (700.5 MiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 10889733  bytes 1870043145 (1.7 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0x92e00000-92efffff  

enp2s0f2: flags=4355<UP,BROADCAST,PROMISC,MULTICAST>  mtu 1500
        ether f8:75:88:4f:37:c3  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0x92d00000-92dfffff  

enp2s0f3: flags=4355<UP,BROADCAST,PROMISC,MULTICAST>  mtu 1500
        ether f8:75:88:4f:37:c4  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0x92c00000-92cfffff  

enp4s0f0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet 10.200.101.131  netmask 255.255.255.0  broadcast 10.200.101.255
        inet6 fe80::fa75:88ff:fe87:9ba8  prefixlen 64  scopeid 0x20<link>
        ether f8:75:88:87:9b:a8  txqueuelen 1000  (Ethernet)
        RX packets 529711971  bytes 158916672735 (148.0 GiB)
        RX errors 0  dropped 6621364  overruns 0  frame 0
        TX packets 400174659  bytes 112070758401 (104.3 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp4s0f1: flags=4355<UP,BROADCAST,PROMISC,MULTICAST>  mtu 1500
        ether f8:75:88:87:9b:a9  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 370548991  bytes 706103298390 (657.6 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 370548991  bytes 706103298390 (657.6 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

输入:

[root@node1 cf-monitor]# echo I love bat > cf.txt

输出:

I love bat

输入:

[root@node1 cf-monitor]# echo I love bat too >> cf.txt

输出:

I love bat
I love bat too

输入:

echo "\"It is a test\""

输出:

"It is a test"

 

标签:errors,TX,RX,bytes,echo,overruns,命令,详解,dropped
来源: https://www.cnblogs.com/ratels/p/11079312.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有