码迷,mamicode.com
首页 > 其他好文 > 详细

22.tail命令

时间:2019-01-13 01:45:02      阅读:157      评论:0      收藏:0      [点我收藏+]

标签:The   emc   line   mct   direct   ret   指定   emctl   code   

tail命令用于输入文件中的尾部内容。tail命令默认在屏幕上显示指定文件的末尾10行。

            tail file (显示文件file的最后10行)
            tail +20 file (显示文件file的内容,从第20行至文件末尾)
            tail -c 10 file (显示文件file的最后10个字符)      

选项:
-c <数字> 显示文件的最后#个字符


实例:

                  显示文件的最后10行
                      [root@localhost tmp]# tail functions 
                              "x$1" = xcondrestart ] ; then

                                  systemctl_redirect $0 $1
                                  exit $?
                          fi
                  fi

                  strstr "$(cat /proc/cmdline)" "rc.debug" && set -x
                  return 0

[root@localhost tmp]# tail -c 20 functions
&& set -x
return 0

22.tail命令

标签:The   emc   line   mct   direct   ret   指定   emctl   code   

原文地址:http://blog.51cto.com/itxuezhe/2342071

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!