如何保留过渡期间的完整 stdout 输出?
如下面典型的例子,你可以看到 yum 元数据刷新状态不会重定向到其 yr.log。
所以我的问题是如何在过渡期间保留这些输出。
#
# yum -v repolist
Not loading "rhnplugin" plugin, as it is disabled
Not loading "product-id" plugin, as it is disabled
Loading "refresh-packagekit" plugin
Loading "security" plugin
Not loading "subscription-manager" plugin, as it is disabled
Config time: 0.015
Yum Version: 3.2.29
RHEL_6.4_x86-64 | 3.9 kB 00:00 ...
RHEL_6.4_zlocal | 2.9 kB 00:00 ...
Setting up Package Sacks
pkgsack time: 0.012
Repo-id : RHEL_6.4_x86-64
Repo-name : RHEL_6.4_x86-64_dvd_all
Repo-revision: 1359576928
Repo-updated : Thu Jan 31 04:22:56 2013
Repo-pkgs : 3,648
Repo-size : 3.2 G
Repo-baseurl : file:///mnt/
Repo-expire : 21,600 second(s) (last: Wed Jun 26 08:26:11 2024)
Repo-id : RHEL_6.4_zlocal
Repo-name : RHEL_6.4_x86-64_dvd_zlocal
Repo-revision: 1715738735
Repo-updated : Wed Mar 31 17:26:56 2021
Repo-pkgs : 3,720
Repo-size : 3.2 G
Repo-baseurl : file:///install/rhel_6.4_x86_64/
Repo-expire : 21,600 second(s) (last: Wed Jun 26 08:26:11 2024)
repolist: 7,368
#
#
#
# yum -v repolist 1> /tmp/yr.log 2> /tmp/yr.err
#
#
# cat /tmp/yr.log
Not loading "rhnplugin" plugin, as it is disabled
Not loading "product-id" plugin, as it is disabled
Loading "refresh-packagekit" plugin
Loading "security" plugin
Not loading "subscription-manager" plugin, as it is disabled
Config time: 0.069
Yum Version: 3.2.29
Setting up Package Sacks
pkgsack time: 0.712
Repo-id : RHEL_6.4_x86-64
Repo-name : RHEL_6.4_x86-64_dvd_all
Repo-revision: 1359576928
Repo-updated : Thu Jan 31 04:22:56 2013
Repo-pkgs : 3,648
Repo-size : 3.2 G
Repo-baseurl : file:///mnt/
Repo-expire : 21,600 second(s) (last: Wed Jun 26 15:24:26 2024)
Repo-id : RHEL_6.4_zlocal
Repo-name : RHEL_6.4_x86-64_dvd_zlocal
Repo-revision: 1715738735
Repo-updated : Wed May 15 10:06:56 2024
Repo-pkgs : 3,720
Repo-size : 3.2 G
Repo-baseurl : file:///install/rhel_6.4_x86_64/
Repo-expire : 21,600 second(s) (last: Wed Jun 26 15:24:27 2024)
repolist: 7,368
#
使用脚本-q -c函数捕获进度计日志。