AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / unix / Perguntas / 779045
Accepted
lylklb
lylklb
Asked: 2024-06-26 20:58:06 +0800 CST2024-06-26 20:58:06 +0800 CST 2024-06-26 20:58:06 +0800 CST

A dúvida sobre o redirecionamento de algum padrão dentro do seu período de transição

  • 772

Como manter o stdout completo com sua saída do período de transição?
Como no exemplo típico a seguir, você pode ver que o status de atualização dos metadados yum não seria redirecionado para seu yr.log.
Portanto, a minha pergunta é como reter estes resultados durante o período de transição.

# 
# 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
# 
io-redirection
  • 1 1 respostas
  • 54 Views

1 respostas

  • Voted
  1. Best Answer
    lylklb
    2024-07-17T21:23:13+08:002024-07-17T21:23:13+08:00

    Usando a função script -q -c para capturar o log do medidor de progresso.

    # 
    #  
    # script -q /tmp/yvr_1.out -c 'yum -v repolist' 1> /tmp/yvr_1.log 2> /tmp/yvr_1.err
    # 
    # 
    # cat /tmp/yvr_1.log
    Not loading "katello" plugin, as it is disabled
    Not loading "product-id" plugin, as it is disabled
    Not loading "rhnplugin" plugin, as it is disabled
    Loading "security" plugin
    Not loading "subscription-manager" plugin, as it is disabled
    Loading "verify" plugin
    Config time: 0.071
    Yum Version: 3.2.22
    Cluster                                                   | 1.5 kB     00:00     
    ClusterStorage                                            | 1.5 kB     00:00     
    RHEL_5.8_local                                            |  951 B     00:00     
    Server                                                    | 1.5 kB     00:00     
    VT                                                        | 1.3 kB     00:00     
    Setting up Package Sacks
    pkgsack time: 0.023
    Repo-id      : Cluster
    Repo-name    : Cluster_r58
    Repo-updated : Fri Feb  3 02:38:19 2012
    Repo-pkgs    : 32
    Repo-size    : 83 M
    Repo-baseurl : file:///mnt/Cluster/
    Repo-expire  : 3,600 second(s) (last: Mon Jul 15 16:33:35 2024)
    
    Repo-id      : ClusterStorage
    Repo-name    : ClusterStorage_r58
    Repo-updated : Fri Feb  3 02:39:28 2012
    Repo-pkgs    : 39
    Repo-size    : 11 M
    Repo-baseurl : file:///mnt/ClusterStorage/
    Repo-expire  : 3,600 second(s) (last: Mon Jul 15 16:33:35 2024)
    
    Repo-id      : RHEL_5.8_local
    Repo-name    : RHEL_5.8_x86-64_all_local
    Repo-updated : Tue Apr 23 10:43:03 2024
    Repo-pkgs    : 3,414
    Repo-size    : 3.6 G
    Repo-baseurl : file:///install/rhel_5.8_x86-64_local/
    Repo-expire  : 3,600 second(s) (last: Mon Jul 15 16:33:35 2024)
    
    Repo-id      : Server
    Repo-name    : Server_r58
    Repo-updated : Fri Feb  3 02:39:04 2012
    Repo-pkgs    : 3,285
    Repo-size    : 3.3 G
    Repo-baseurl : file:///mnt/Server/
    Repo-expire  : 3,600 second(s) (last: Mon Jul 15 16:33:35 2024)
    
    Repo-id      : VT
    Repo-name    : VT_r58
    Repo-updated : Fri Feb  3 02:38:17 2012
    Repo-pkgs    : 58
    Repo-size    : 193 M
    Repo-baseurl : file:///mnt/VT/
    Repo-expire  : 3,600 second(s) (last: Mon Jul 15 15:33:36 2024)
    
    repolist: 6,828
    # 
    # 
    
    • 1

relate perguntas

  • Como redirecionar uma mensagem de erro para /dev/null?

  • Existe uma ferramenta semelhante ao `tee` para stdin?

  • Redirecionar para crontab com um heredocument

  • Como dividir uma saída em dois arquivos com grep?

  • Como salvar uma saída do airodump-ng em um arquivo?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Possível firmware ausente /lib/firmware/i915/* para o módulo i915

    • 3 respostas
  • Marko Smith

    Falha ao buscar o repositório de backports jessie

    • 4 respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    user12345 Falha ao buscar o repositório de backports jessie 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl Por que a maioria dos exemplos do systemd contém WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve