首页 > 技术文章 > 巧用tail查看软件的安装进程

litifeng 2018-03-15 21:16 原文

我在使用perlbrew安装perl的时候,学到的一招,呵呵。

有时候,安装软件的时候,特别是手动安装的时候,没有什么提示信息,只能干等着,其实,可以使用tail命令来跟踪安装日志的尾部,来观察安装的进程。

具体说明:

比如:我用perlbrew安装perl:

perlbrew install perl-5.26.1

这时候,perlbrew提示要好久才能安装好,你可以通过tail来查看安装进程:

This could take a while. You can run the following command on another shell to track the status:

  tail -f ~/perl5/perlbrew/build.perl-5.26.1.log

tail的命令解释:默认是打印最后10行到标准输出。

Print  the  last  10  lines of each FILE to standard output.  With more
       than one FILE, precede each with a header giving the file name.

       With no FILE, or when FILE is -, read standard input.

       Mandatory arguments to long options are  mandatory  for  short  options
       too.

-f的含义是:当文件增长时输出附加的数据。

-f, --follow[={name|descriptor}]
              output appended data as the file grows;

 

推荐阅读