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 / user-230119

Exercise To The Reader's questions

Martin Hope
Exercise To The Reader
Asked: 2019-04-25 05:31:04 +0800 CST

Substituindo vários padrões, um dos quais tem colchetes e o outro um caractere de tabulação

  • 0

Eu tenho um arquivo de texto contendo a linha:

[...]
GFX Clocks and Power:
    800 MHz (MCLK)
    26 MHz (SCLK)
[...]

Eu quero extrair a 800 MHzparte dele (o valor não é constante), então quero remover \te (MCLK)usar sed.

Este é o comando que tenho agora:

$ cat ~/test.txt | grep "(MCLK)" | xargs -0 sed -i -e $'s/\t//g' -e 's/\(MCLK\)//g'

Ao executar, ele retorna:

sed: can't read     800 MHz (MCLK)
: No such file or directory

Não parece ser um erro de nova linha e o problema de \tser um caractere não padrão para sed(cf. Simples substituição sed de guias falhando misteriosamente ) deve ser corrigido.

Qual poderia ser o problema?

sed
  • 5 respostas
  • 185 Views
Martin Hope
Exercise To The Reader
Asked: 2019-01-03 03:17:42 +0800 CST

Falha na importação de chaves de keyring.debian.org

  • 2

Atualizando repositórios com apt updatefalha, pois as chaves públicas de várias assinaturas não estão disponíveis.

$ sudo apt update
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://deb.debian.org/debian stretch InRelease                                                                              
Hit:3 http://deb.debian.org/debian stretch Release                                                                                
Ign:4 http://ftp.fr.debian.org/debian stretch InRelease                                                                           
Ign:6 http://ftp.fr.debian.org/debian jessie InRelease                                                                            
Hit:7 https://fr.archive.ubuntu.com/ubuntu bionic InRelease                                                                       
Hit:8 http://ftp.fr.debian.org/debian stretch Release                                                                             
Get:5 http://ftp.fr.debian.org/debian stretch-updates InRelease [91.0 kB]                                                         
Hit:9 https://riot.im/packages/debian stretch InRelease                                                                           
Hit:10 http://ftp.fr.debian.org/debian jessie Release                                                                             
Err:1 http://security.debian.org/debian-security stretch/updates InRelease                                                        
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9D6D8F6BC857C906 NO_PUBKEY 8B48AD6246925553
Get:11 https://mega.nz/linux/MEGAsync/Debian_9.0 ./ InRelease [1,480 B]                                                           
Ign:12 http://download.opensuse.org/repositories/home:/strycore/Debian_9.0 ./ InRelease                                           
Hit:13 http://download.opensuse.org/repositories/home:/strycore/Debian_9.0 ./ Release                                             
Err:14 http://deb.debian.org/debian stretch Release.gpg                           
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY EF0F382A1A7B6500
Get:15 https://content.runescape.com/downloads/ubuntu trusty InRelease [2,236 B]
Err:16 http://ftp.fr.debian.org/debian stretch Release.gpg
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY EF0F382A1A7B6500
Err:9 https://riot.im/packages/debian stretch InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E019645248E8F4A1
Err:5 http://ftp.fr.debian.org/debian stretch-updates InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
Err:17 http://ftp.fr.debian.org/debian jessie Release.gpg
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY CBF8D6FD518E17E1
Err:11 https://mega.nz/linux/MEGAsync/Debian_9.0 ./ InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4B4E7A9523ACD201
Err:18 http://download.opensuse.org/repositories/home:/strycore/Debian_9.0 ./ Release.gpg
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2F7F0DA5FD5B64B9
Err:15 https://content.runescape.com/downloads/ubuntu trusty InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7373B12CE03BEB4B
Reading package lists... Done 
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.debian.org/debian-security stretch/updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9D6D8F6BC857C906 NO_PUBKEY 8B48AD6246925553
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://deb.debian.org/debian stretch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY EF0F382A1A7B6500
W: Skipping acquire of configured file 'xenial/binary-amd64/Packages' as repository 'https://fr.archive.ubuntu.com/ubuntu bionic InRelease' doesn't have the component 'xenial' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'xenial/binary-i386/Packages' as repository 'https://fr.archive.ubuntu.com/ubuntu bionic InRelease' doesn't have the component 'xenial' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'xenial/i18n/Translation-en_US' as repository 'https://fr.archive.ubuntu.com/ubuntu bionic InRelease' doesn't have the component 'xenial' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'xenial/i18n/Translation-en' as repository 'https://fr.archive.ubuntu.com/ubuntu bionic InRelease' doesn't have the component 'xenial' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'xenial/dep11/Components-amd64.yml' as repository 'https://fr.archive.ubuntu.com/ubuntu bionic InRelease' doesn't have the component 'xenial' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'xenial/dep11/icons-64x64.tar' as repository 'https://fr.archive.ubuntu.com/ubuntu bionic InRelease' doesn't have the component 'xenial' (component misspelt in sources.list?)
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ftp.fr.debian.org/debian stretch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY EF0F382A1A7B6500
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://riot.im/packages/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E019645248E8F4A1
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ftp.fr.debian.org/debian stretch-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ftp.fr.debian.org/debian jessie Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 NO_PUBKEY CBF8D6FD518E17E1
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://mega.nz/linux/MEGAsync/Debian_9.0 ./ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4B4E7A9523ACD201
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://download.opensuse.org/repositories/home:/strycore/Debian_9.0 ./ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2F7F0DA5FD5B64B9
W: GPG error: https://content.runescape.com/downloads/ubuntu trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7373B12CE03BEB4B
E: The repository 'https://content.runescape.com/downloads/ubuntu trusty InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Tentei atualizar as chaves semkeyring.debian.org

$ gpg  --recv-keys 9D6D8F6BC857C906
gpg: key 9D6D8F6BC857C906: 12 signatures not checked due to missing keys
gpg: key 9D6D8F6BC857C906: "Debian Security Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

e com

$ gpg --keyserver keyring.debian.org --recv-keys 9D6D8F6BC857C906
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0

ca-certificatesestá atualizado com a versão 20180409, bem como debian-keyringcom a versão 2018.03.24.

Eu também deletei /etc/apt/trusted.gpgconforme https://serverfault.com/q/851724 .

Pedido de @Stephen Kitt:

$ ls -la /etc/apt/trusted.gpg.d
total 28
drwxr-xr-x 2 root root  4096 Jan  2 10:42 .
drwxr-xr-x 6 root root  4096 Jan  2 11:06 ..
-rw-r--r-- 1 root root 10345 Jan  2 10:42 ubuntu-keyring-2012-archive.gpg
-rw-r--r-- 1 root root  2796 Feb  6  2018 ubuntu-keyring-2012-archive.gpg~
-rw-r--r-- 1 root root  2794 Feb  6  2018 ubuntu-keyring-2012-cdimage.gpg

$ apt policy debian-archive-keyring
debian-archive-keyring:
  Installed: 2017.7ubuntu1
  Candidate: 2017.7ubuntu1
  Version table:
 *** 2017.7ubuntu1 500
        500 https://fr.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        500 https://fr.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
        100 /var/lib/dpkg/status
     2017.5 500
        500 http://ftp.fr.debian.org/debian stretch/main amd64 Packages
        500 http://ftp.fr.debian.org/debian stretch/main i386 Packages
        500 http://deb.debian.org/debian stretch/main amd64 Packages
        500 http://deb.debian.org/debian stretch/main i386 Packages
     2017.5~deb8u1 500
        500 http://ftp.fr.debian.org/debian jessie/main amd64 Packages
        500 http://ftp.fr.debian.org/debian jessie/main i386 Packages

Como resolvo o problema de importar as chaves apropriadas?

debian apt
  • 2 respostas
  • 6905 Views
Martin Hope
Exercise To The Reader
Asked: 2018-12-24 07:44:57 +0800 CST

Inicializando com `cgroup: cgroup2: opção desconhecida "nsdelegate"` impede que qualquer gráfico apareça

  • 1

Atualizei recentemente meu Linux 4.9.0-8 debian 6.3.0. Porém, quando reiniciei minha máquina, acabei tendo a mensagem no título. Impedindo-me de acessar o terminal gráfico. Não consigo acessar meus arquivos, o que é muito sério. Todos os ícones e imagens falham ao carregar. Não consigo abrir nenhuma janela, mas o GNOME parece funcionar como se fosse normal.

Eu tentei atualizar o GRUB via modo de recuperação, mas fora isso, não tenho muitas ideias.

debian troubleshooting
  • 1 respostas
  • 3429 Views
Martin Hope
Exercise To The Reader
Asked: 2018-02-28 14:32:32 +0800 CST

Processando variável local com expressões regulares

  • 1

Eu tenho alguns arquivos de vídeo source/para codificar e quero que a saída seja salva no diretório local, removendo, portanto, source/o nome do arquivo.

Consegui isso usando o seguinte comando no shell de peixe:

$ for file in source/*.mkv
      ffmpeg -i "$file" -c:v copy -c:a copy (echo "$file" | sed -e "s/source\///")
  end

Embora eu ache a saída echoum sedpouco rudimentar, existe uma função que processa apenas as strings de variáveis ​​locais? Como um sed, mas apenas para variáveis ​​locais ou nomes de arquivos.

text-processing regular-expression
  • 2 respostas
  • 427 Views
Martin Hope
Exercise To The Reader
Asked: 2018-01-24 13:34:15 +0800 CST

A atualização da distro gera novas e diferentes imagens de inicialização

  • 1

Eu inicializo duas vezes o Windows e o Fedora em uma máquina com GRUB. Sempre que eu atualizo o Fedora ou seu kernel Linux, ele gera uma nova imagem de disco /bootcriando assim outra opção de inicialização ao carregar o GRUB. No entanto, Arch Linux em outra máquina sempre que atualizo a distro ou seu kernel, não há alteração no arquivo /boot.

Perdoe-me se tenho uma compreensão falha de como isso funciona; quando o kernel ou distro do Linux é atualizado e uma nova imagem de inicialização é atualizada, isso não significa que as versões anteriores da imagem são essencialmente obsoletas, elas não deveriam ser excluídas (portanto, substituídas por sua contraparte atualizada)?

Por que uma imagem nova e diferente é gerada em /boot? É seguro simplesmente excluir as versões anteriores?

grub boot-loader
  • 1 respostas
  • 42 Views

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