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-143955

MikiBelavista's questions

Martin Hope
MikiBelavista
Asked: 2025-01-14 22:07:44 +0800 CST

Por que minha instalação do Ubuntu falha? reinicia para initramfs

  • 5

Eu segui passo a passo -criar-um-pendrive-usb-inicializável meu pendrive

Device        Start      End  Sectors  Size Type
/dev/sda1        64 12105119 12105056  5,8G Microsoft basic data
/dev/sda2  12105120 12115263    10144    5M EFI System
/dev/sda3  12115264 12115863      600  300K Microsoft basic data
/dev/sda4  12115968 61437951 49321984 23,5G Linux filesystem

Quando reinicio o laptop, só aparece a linha que

error file `/boot/` not found

Eu continuo e termino algo, mas a primeira reinicialização retorna ao initramfs.

insira a descrição da imagem aqui Por quê? É um problema de BIOS (meu laptop é Hp EliteBook)?

ubuntu
  • 1 respostas
  • 23 Views
Martin Hope
MikiBelavista
Asked: 2025-01-14 16:05:27 +0800 CST

Como desmontar USB?/dev/sda já está montado

  • 5

Se eu tentar

sudo umount -f /dev/sda
umount: /dev/sda: not mounted.

mas Ventoy falha

sudo bash Ventoy2Disk.sh -i /dev/sda

**********************************************
      Ventoy: 1.0.99  x86_64
      longpanda [email protected]
      https://www.ventoy.net
**********************************************

/dev/sda1 /media/miki/Ubuntu\04024.10\040amd64 iso9660 ro,nosuid,nodev,relatime,nojoliet,check=s,map=n,blocksize=2048,uid=1000,gid=1000,dmode=500,fmode=400,iocharset=utf8 0 0
/dev/sda is already mounted, please umount it first!

lsblk mostra

loop49        7:49   0     7M  1 loop /snap/yq/2634
sda           8:0    1  29,3G  0 disk 
├─sda1        8:1    1   5,3G  0 part /media/miki/Ubuntu 24.10 amd64
├─sda2        8:2    1   4,9M  0 part 
├─sda3        8:3    1   300K  0 part 
└─sda4        8:4    1    24G  0 part

O que devo tentar?

ubuntu
  • 1 respostas
  • 18 Views
Martin Hope
MikiBelavista
Asked: 2024-12-19 00:49:04 +0800 CST

Como redirecionar a saída para um arquivo com registro de data e hora? [duplicado]

  • 3
Esta pergunta já tem respostas aqui :
Como passar a saída de um comando como argumento de linha de comando para outro? (7 respostas)
Fechado há 6 horas .

O Myscript será executado todos os dias e excluirá os arquivos antigos. Crie o arquivo para onde desejo redirecionar a saída

echo myproj-"date+ %Y-%m-%d"

Agora do cli

jf rt del (some files) >como especificar meu arquivo aqui

A cada dia será diferente, por causa do registro de data e hora.

Como adicionar isso?

linux
  • 1 respostas
  • 28 Views
Martin Hope
MikiBelavista
Asked: 2024-11-21 22:46:04 +0800 CST

Como fazer o awk para que o restante da linha permaneça intacto?

  • 3

Eu tenho linha

* {@jira: PIVOT-9968} Provide a way to pass an `IMemoryCollector` to `IInternalMemoryMonitored#getMemoryStatistics(memoryCollector)` in order to prevent the count of duplicated blocks.

Eu queria escapar apenas do primeiro que contém o número do tíquete(?). Escreva um script para adicionar barra invertida para meu problema anterior

* /{@jira: PIVOT-9968/} Provide a way to pass an `IMemoryCollector` to `IInternalMemoryMonitored#getMemoryStatistics(memoryCollector)` in order to prevent the count of duplicated blocks.

tentei

mawk '/^\* {@jira: PIVOT/ { gsub(/[{} ]/,"\\\\&") } 1' changelog.md > tmp && mv tmp changelog.md

e consegui

*\ \{@jira:\ PIVOT-8019\}\ Pivot:\ Added\ `MaxAppendOnlyFunction`\ and\ \ `MinAppendOnlyFunction`\ aggregation\ functions\ that\ do\ not\ support\ disaggregation\ but\ can\ be\ used\ within\ an\ aggregate\ provider.

o que devo mudar? gsub?

awk
  • 1 respostas
  • 68 Views
Martin Hope
MikiBelavista
Asked: 2024-11-21 01:01:35 +0800 CST

Como escrever chaves de prefixo de script com barras invertidas

  • 4

Eu já postei adicionar caractere de escape com bash . Preciso de um script para isso para cada linha em um arquivo que começa com {@codeBlock

então

{@codeBlock: TEstBigquerry.buildPicks}

deveria parecer

\{@codeBlock:\ TEstBigquerry.buildPicks\}

Meu roteiro

#!/bin/bash

file=clfields.mdx

while read -r line; do
  if [[ "${line::11}" == '{@codeBlock' ]]; then
    printf '%q\n' "$line"
  else
    echo "$line"
  fi
done < clfields.mdx

A saída do terminal está ok, mas o arquivo continua o mesmo. Por quê?

bash
  • 3 respostas
  • 84 Views
Martin Hope
MikiBelavista
Asked: 2024-11-20 20:14:10 +0800 CST

Como adicionar um caractere de escape com o bash?

  • 4

Eu quero isso

{@codeBlock: TEstBigquerry.buildPicks}

tornar-se

\{@codeBlock: TEstBigquerry.buildPicks/}

tentei

sed -i '/{@/\{@' joana.txt

pegou

sed: -e expressão #1, char 5: comando desconhecido: `'

como adicionar uma string de escape duas vezes?

bash
  • 1 respostas
  • 38 Views
Martin Hope
MikiBelavista
Asked: 2024-09-23 21:44:51 +0800 CST

Falha na cópia do Dockerfile: '"/azsh-linux-agent/start.sh" não encontrado' durante a compilação. Por quê?

  • 5

Este é meu Dockerfile

FROM ubuntu:22.04

RUN apt update
RUN apt upgrade -y
RUN apt install -y curl git jq libicu70

# Also can be "linux-arm", "linux-arm64".
ENV TARGETARCH="linux-x64"

WORKDIR /azp/

COPY ./azsh-linux-agent/start.sh ./
RUN chmod +x ./start.sh

RUN useradd agent
RUN chown agent ./
USER agent
ENTRYPOINT ./start.sh

Eu tento construir uma imagem, a partir de pwd

/home/jh/azsh-linux-agent

Recebi um erro quando tentei construir

docker build --tag "azsh-linux-agent:1.0" --file "./azsh-linux-agent.dockerfile" .

assim

--------------------
  10 |     WORKDIR /azp/
  11 |     
  12 | >>> COPY ./azsh-linux-agent/start.sh ./
  13 |     RUN chmod +x ./start.sh
  14 |     
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref c6a592e2-a63c-497e-addd-2fab546c3594::hy7y7sols7kbk34sms7iylyew: "/azsh-linux-agent/start.sh": not found

por que o script não é detectado?

ubuntu
  • 1 respostas
  • 21 Views
Martin Hope
MikiBelavista
Asked: 2024-03-05 17:15:17 +0800 CST

Por que o pacote libnetfilter_queue não foi encontrado no caminho de pesquisa do pkg-config?

  • 5

tentei

make all
go build -o bettercap .
go build github.com/chifflier/nfqueue-go/nfqueue:
# pkg-config --cflags  -- libnetfilter_queue
Package libnetfilter_queue was not found in the pkg-config search path.
Perhaps you should add the directory containing `libnetfilter_queue.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libnetfilter_queue' found
pkg-config: exit status 1
go build github.com/google/gousb:
# pkg-config --cflags  -- libusb-1.0
Package libusb-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libusb-1.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libusb-1.0' found
pkg-config: exit status 1

Estou no Ubuntu 22.04.

apt-cache search libnetfilter_queue
golang-github-chifflier-nfqueue-go-dev - Go bindings for NFQueue
libnetfilter-queue-dev - Development files for libnetfilter-queue1
libnetfilter-queue-doc - Documentation files for libnetfilter-queue1
libnetfilter-queue1 - Netfilter netlink-queue library
ruby-nfqueue - Wrapper around libnetfilter_queue using FFI

Como resolver isso? o que devo instalar?

ubuntu
  • 1 respostas
  • 11 Views
Martin Hope
MikiBelavista
Asked: 2023-12-27 17:24:35 +0800 CST

Por que o Ubuntu não vê o npm? sudo: npm: comando não encontrado

  • 4

eu corro

sudo npm install -g @angular/cli

pegou

sudo: npm: command not found

Vamos checar

nvm install v20.0.0
v20.0.0 is already installed.
Now using node v20.0.0 (npm v9.6.4)

e

which npm
/home/miki/.nvm/versions/node/v20.0.0/bin/npm

por que parece que o npm não está instalado? Estou em Ubunutu 22.04.

ubuntu
  • 1 respostas
  • 32 Views
Martin Hope
MikiBelavista
Asked: 2023-05-09 17:09:13 +0800 CST

O que RUN rm -Rf faz no Dockerfile?

  • 3

Estou tendo problemas com o código legado da empresa. Dockerfile

FROM mycomp/tech:2.13

RUN rm -Rf /opt/app/src/api

COPY src/ /opt/app/src/
COPY config.json /opt/app/config.json

serve para que RUN rm -Rf? Por que o cara que escreveu o Dockerfile o adicionou? Como ele será mapeado no contêiner?

docker
  • 1 respostas
  • 58 Views
Martin Hope
MikiBelavista
Asked: 2023-05-02 22:11:10 +0800 CST

Como obter informações completas sobre as pontes?

  • 5

Eu tenho muitas pontes no meu laptop, Ubuntu 22.04

ip link show type bridge

shows

3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:53:00:0a:c6:8d brd ff:ff:ff:ff:ff:ff
3: mpqemubr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:53:00:83:b8:32 brd ff:ff:ff:ff:ff:ff
5: br-9910826e1e83: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default 
    link/ether 02:32:22:ee:e6:a7 brd ff:ff:ff:ff:ff:ff
6: br-9ceb855c322b: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:32:58:1c:77:17 brd ff:ff:ff:ff:ff:ff
7: br-f6d0af00ea88: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 

tentei

ip link xstats type bridge
virbr0          
                    IGMP queries:
                      RX: v1 0 v2 0 v3 0
                      TX: v1 0 v2 0 v3 0
                    IGMP reports:
                      RX: v1 0 v2 0 v3 0
                      TX: v1 0 v2 0 v3 0
                    IGMP leaves: RX: 0 TX: 0
                    IGMP parse errors: 0
                    MLD queries:
                      RX: v1 0 v2 0
                      TX: v1 0 v2 0
                    MLD reports:
                      RX: v1 0 v2 0
                      TX: v1 0 v2 0
                    MLD leaves: RX: 0 TX: 0
                    MLD parse errors: 0

Eu não entendo a saída. Como obter informações sobre interfaces e como a ponte foi criada?

ubuntu
  • 1 respostas
  • 30 Views
Martin Hope
MikiBelavista
Asked: 2023-04-29 17:14:11 +0800 CST

Como usar o scp para copiar para a VM?

  • 5

Minha caixa virtual mininet

hostname
mininet-vm

ip ashows

inet 10.0.2.15/24

Do meu cliente, transferindo para a VM remota:

scp 6jan.txt [email protected]

Não consigo ver nenhum arquivo transferido. Por que?

ubuntu
  • 1 respostas
  • 18 Views
Martin Hope
MikiBelavista
Asked: 2023-02-17 07:22:16 +0800 CST

Por que a instalação do snapd falhou?nada fornece a conclusão bash necessária para snapd-2.57.6-2.el8.x86_64

  • 5

eu executo o comando

yum install snapd

pegou

Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:04:34 ago on Thu 16 Feb 2023 03:14:18 PM UTC.
Error: 
 Problem: conflicting requests
  - nothing provides bash-completion needed by snapd-2.57.6-2.el8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[root@rhel ~]# yum install snapd --skip-broken
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:04:45 ago on Thu 16 Feb 2023 03:14:18 PM UTC.

eu verifiquei uname

Linux rhel.localdomain 5.14.0-162.12.1.el9_1.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Dec 20 06:06:30 EST 2022 x86_64 x86_64 x86_64 GNU/Linux

por que a instalação do snapd falhou no rhel9?

rhel
  • 1 respostas
  • 14 Views
Martin Hope
MikiBelavista
Asked: 2022-10-07 04:58:51 +0800 CST

Por que a mudança de senha falhou? chpasswd: Permissão negada

  • 0

Meu Dockerfile

FROM ubuntu:latest
RUN apt update
RUN apt install -y openssh-server sudo 
RUN useradd -ms /bin/bash -g root -G sudo -u 1000 remote_user
USER remote_user
WORKDIR /home/remote_user
RUN mkdir /home/remote_user/.ssh && chmod 700 /home/remote_user/.ssh
COPY remotecentos.pub /home/remote_user/.ssh/authorized_keys
RUN stat /etc/passwd
RUN  echo 'remote_user:*****2599*****' | chpasswd -c SHA256
RUN service ssh start
EXPOSE 22
CMD ["/usr/sbin/sshd","-D"]

eu tenho erro

Step 9/13 : RUN stat /etc/passwd
 ---> Running in 7147677000bd
  File: /etc/passwd
  Size: 1325        Blocks: 8          IO Block: 4096   regular file
Device: 37h/55d Inode: 22961332    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-10-06 12:45:10.000000000 +0000
Modify: 2022-10-06 12:45:10.000000000 +0000
Change: 2022-10-06 12:45:11.197943157 +0000
 Birth: 2022-10-06 12:45:11.197943157 +0000
Removing intermediate container 7147677000bd
 ---> 7b37835f7f2c
Step 10/13 : RUN  echo 'remote_user:******' | chpasswd -c SHA256
 ---> Running in faae63d7fd92
chpasswd: Permission denied.
chpasswd: cannot lock /etc/passwd; try again later.

Como corrigir permissões dentro do contêiner?

Como devo alterar a linha passwd?

ubuntu permissions
  • 1 respostas
  • 35 Views
Martin Hope
MikiBelavista
Asked: 2020-01-10 09:12:13 +0800 CST

Como instalar o awscli no Ubuntu 18.04?

  • 5

Isso deveria ser trivial, mas parece que não é. Formatei meu comp e instalei o conda (estou acostumado com esta ferramenta de pacote)

pip install awscli --upgrade --user
Requirement already up-to-date: awscli in ./.local/lib/python3.7/site-packages (1.16.313)

Mas agora estou com problema

aws --version

Command 'aws' not found, but can be installed with:

sudo snap install aws-cli  # version 1.16.266, or
sudo apt  install awscli 

eu tentei

sudo apt  install awscli
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package awscli is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'awscli' has no installation candidate

Atualizei e atualizei minha distro para não ver nenhum problema desse lado. Como consertar isto?

instalação instantânea

error: This revision of snap "aws-cli" was published using classic confinement
       and thus may perform arbitrary system changes outside of the security
       sandbox that snaps are usually confined to, which may put your system at
       risk.

       If you understand and want to proceed repeat the command including
       --classic.
ubuntu software-installation
  • 2 respostas
  • 8589 Views
Martin Hope
MikiBelavista
Asked: 2019-07-10 01:12:08 +0800 CST

Como alterar as permissões de todos os arquivos no meu diretório?

  • -1

Eu usei um script para instalar o Hadoop

/opt/hadoop-3.2.0$ ll
total 216
drwxr-xr-x 10 yarn hadoop   4096 јул  9 08:05 ./
drwxr-xr-x  9 root root     4096 јул  9 07:42 ../
drwxr-xr-x  2 yarn hadoop   4096 јан  8 08:59 bin/
drwxr-xr-x  3 yarn hadoop   4096 јан  8 07:13 etc/
drwxr-xr-x  2 yarn hadoop   4096 јан  8 08:59 include/
drwxr-xr-x  3 yarn hadoop   4096 јан  8 08:58 lib/
drwxr-xr-x  4 yarn hadoop   4096 јан  8 08:59 libexec/
-rw-rw-r--  1 yarn hadoop 150569 окт 18  2018 LICENSE.txt
drwxrwxr-x  2 yarn hadoop   4096 јул  9 08:05 logs/
-rw-rw-r--  1 yarn hadoop  22125 окт 18  2018 NOTICE.txt
-rw-rw-r--  1 yarn hadoop   1361 окт 19  2018 README.txt
drwxr-xr-x  3 yarn hadoop   4096 јан  8 07:13 sbin/
drwxr-xr-x  4 yarn hadoop   4096 јан  8 09:32 share/

Agora eu quero mudar as permissões

/opt/hadoop-3.2.0$ whoami
miki

Meu objetivo é que miki seja o dono de todos os arquivos do hadoop-3.2.0. Acho que devo usar chmod? Como deve ser o comando?

permissions chmod
  • 1 respostas
  • 41 Views
Martin Hope
MikiBelavista
Asked: 2019-07-09 23:41:15 +0800 CST

Após a edição do arquivo ~/.bashrc: comando ll não encontrado

  • 0

Eu estava instalando o Hadoop no meu Ubuntu.

Este é o meu CAMINHO agora

echo $PATH
/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin:/home/miki/.local/bin:/opt/hadoop-3.2.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Se eu tentarll

miki@miki:~$ ll
ll: command not found

Minha linha de edição bashrc

echo 'export HADOOP_HOME=/opt/hadoop-3.2.0;export PATH=$HADOOP_HOME/bin:$PATH' > ~/.bashrc

o arquivo ~/.bashrc tem apenas uma linha

export HADOOP_HOME=/opt/hadoop-3.2.0

Todos os scripts anteriores foram excluídos.

Também é estranho que as letras tenham mudado de cor. Por quê?

permissions bashrc
  • 1 respostas
  • 721 Views
Martin Hope
MikiBelavista
Asked: 2019-06-25 06:24:43 +0800 CST

SSH para AWS Ec2: porta 22: a conexão expirou

  • 1

Estou tentando ssh (do meu desktop Ubuntu 18.04) para uma instância do EC2 em execução

ssh -i /home/miki/pizda/jk/keys/kur/kjam/python-kjam.pem [email protected]
ssh: connect to host ec2-18-194-207-247.eu-central-1.compute.amazonkur.com port 22: Connection timed out

O mesmo Se eu tentar IP

ssh -i /home/miki/pizda/jk/keys/kur/kjam/python-kjam.pem [email protected]
ssh: connect to host 18.194.207.247 port 22: Connection timed out

Eu posso pingar IP

ping 18.194.207.247
PING 18.194.207.247 (18.194.207.247) 56(84) bytes of data.
^C
--- 18.194.207.247 ping statistics ---
544 packets transmitted, 0 received, 100% packet loss, time 556011ms

Por que tenho 100% de perda de pacotes? Como definir grupos de segurança? insira a descrição da imagem aqui O que mais poderia causar problemas?

ssh aws
  • 1 respostas
  • 5266 Views
Martin Hope
MikiBelavista
Asked: 2019-06-04 22:43:41 +0800 CST

Ssh Sem rota para hospedar

  • 7

Estou tentando copiar minha chave Corosync do meu desktop para o meu laptop.

sudo scp /etc/corosync/authkey  [email protected]:~

O que eu tenho é isso

ssh: connect to host 192.168.0.10 port 22: No route to host
lost connection

Ambos usam o mesmo roteador na minha casa.

Do meu desktop, estou fazendo ping no laptop

ping 192.168.0.10
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.
64 bytes from 192.168.0.10: icmp_seq=1 ttl=64 time=1.29 ms
64 bytes from 192.168.0.10: icmp_seq=2 ttl=64 time=1.08 ms
64 bytes from 192.168.0.10: icmp_seq=3 ttl=64 time=1.03 ms
64 bytes from 192.168.0.10: icmp_seq=4 ttl=64 time=1.05 ms
^C
--- 192.168.0.10 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 1.039/1.118/1.298/0.110 ms

    4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 3004ms

Telenet é recusada

telnet 192.168.0.10 22
Trying 192.168.0.10...
telnet: Unable to connect to remote host: Connection refused

IP da minha área de trabalho

inet 192.168.0.12/24 brd 192.168.0.255 scope global dynamic noprefixroute enp3s0

IP do meu notebook

inet 192.168.0.10/24 brd 192.168.0.255 scope global dynamic noprefixroute wlo1

Minha ideia era abrir a porta 22. Saída Netstat

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:902             0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:38183           0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:55181           0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:38767         0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:2224            0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:8307          0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:57721           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN      3340/dropbox        
tcp        0      0 127.0.0.1:17600         0.0.0.0:*               LISTEN      3340/dropbox        
tcp        0      0 0.0.0.0:5473            0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:17603         0.0.0.0:*               LISTEN      3340/dropbox        
tcp        0      0 0.0.0.0:37795           0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::902                  :::*                    LISTEN      -                   
tcp6       0      0 :::48647                :::*                    LISTEN      -                   
tcp6       0      0 :::111                  :::*                    LISTEN      -                   
tcp6       0      0 :::2224                 :::*                    LISTEN      -                   
tcp6       0      0 :::80                   :::*                    LISTEN      -                   
tcp6       0      0 :::39283                :::*                    LISTEN      -                   
tcp6       0      0 :::51607                :::*                    LISTEN      -                   
tcp6       0      0 ::1:631                 :::*                    LISTEN      -                   
tcp6       0      0 :::443                  :::*                    LISTEN      -                   
tcp6       0      0 :::35835                :::*                    LISTEN      -                   
tcp6       0      0 :::17500                :::*                    LISTEN      3340/dropbox        
tcp6       0      0 :::2049                 :::*                    LISTEN      - 

Tentei novamente abrir 22

sudo iptables -A INPUT -p tcp --dport ssh -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT

mas ainda não vejo 22 com netstat

netstat -tpln | grep 22
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:2224            0.0.0.0:*               LISTEN      -                   
tcp6       0      0 :::2224                 :::*                    LISTEN      -  

Como resolver este problema?

RESOLVIDO Era um problema de sshd. Limpei e instalei o servidor OpenSSH.

networking ssh
  • 2 respostas
  • 21021 Views
Martin Hope
MikiBelavista
Asked: 2019-05-29 01:36:49 +0800 CST

Por que o tamanho do arquivo ls show é diferente ao alterar o tamanho do bloco?

  • 1

Eu queria verificar o tamanho do backup do meu sistema de arquivos

ls -lia backup.tgz 
17 -rw-r--r-- 1 root root 84972633333 мај 28 10:05 backup.tgz

Com tamanho de bloco M

 ls -l --block-size=M backup.tgz 
-rw-r--r-- 1 root root 81037M мај 28 10:05 backup.tgz

Finalmente com tamanho de bloco G

ls -l --block-size=G backup.tgz 
-rw-r--r-- 1 root root 80G мај 28 10:05 backup.tgz

Alguém poderia explicar uma diferença tão grande?

files ls
  • 1 respostas
  • 1313 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