AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-370877

ecjb's questions

Martin Hope
ecjb
Asked: 2024-06-08 20:57:43 +0800 CST

无法使用 neomutt 打开 .mbox 文件(尽管它适用于 mutt)

  • 7

无法使用 mutt 打开 .mbox 文件

我想打开.mbox从 Gmail 帐户下载的 10GB 文件。当我使用命令时

neomutt -f 10GB_mboxfile.mbox

neomutt 需要 10-20 秒才能打开,当最终打开时,应用程序中没有列出任何文件。我有以下虚拟文件.mbox(我从 gmail mbox 文件修改而来):

From 9999999999999999@xxx Tue Mar 09 17:00:00 +0500 2019  
X-GM-THRID: 99999999999999999
X-mail-Labels: Archived,Sent,Opened
MIME-Version: 1.0
Date: Tue, 09 Mar 2019 17:00:00 +0500
Message-ID: <[email protected]>
Subject: THETITLE
From: My Name <[email protected]>
To: [email protected]
Content-Type: multipart/alternative; boundary="0000000000009999999999999"

--0000000000009999999999999
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable


ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ da=
s ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

--0000000000009999999999999
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div>ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ=
ZZ das ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ=
>

--0000000000009999999999999--

我尝试使用 neomutt 打开它,如下所示:

neomutt -f themboxfile.mbox

neomutt 打开了,但应用程序中没有列出任何消息。如何使用 neomutt 打开此文件?(虽然使用 mutt 可以打开同一个文件...)

email
  • 1 个回答
  • 98 Views
Martin Hope
ecjb
Asked: 2023-11-28 18:57:50 +0800 CST

按字母顺序显示结果,无论大小写

  • 5

ls我在 MacOS 11.6.1 上使用。在输出中,大写字母显示在小写字母之前。例如,我得到以下输出:

$ ls

Blabla.txt
GAGAS.txt
asdf.txt
blabla.txt

并希望有:

$ ls

asdf.txt
blabla.txt
Blabla.txt
GAGAS.txt

这是正常的默认输出吗ls?我怎样才能得到输出数字2?

ls
  • 1 个回答
  • 35 Views
Martin Hope
ecjb
Asked: 2023-09-30 01:30:05 +0800 CST

使用生成的公钥登录远程服务器

  • 5

我有一个 zsh 脚本,用它登录远程主机来复制一些文件夹。系统每次都会要求我提供我想要绕过的本地主机的密码,否则我必须多次输入密码。

我遵循以下教程: https://www.thegeekstuff.com/2008/06/perform-ssh-and-scp-without-entering-password-on-openssh/

它曾经起作用过,但后来就不起作用了。我按照以下步骤操作(并再次按照这些步骤操作了很多次),但现在它不再起作用了。

[local-host]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):<Hit enter>
Enter passphrase (empty for no passphrase): <Enter your passphrase here>
Enter same passphrase again:<Enter your passphrase again>
Your identification has been saved in /home/jsmith/.ssh/id_rsa.
Your public key has been saved in /home/jsmith/.ssh/id_rsa.pub.
The key fingerprint is:
31:3a:5d:dc:bc:81:81:71:be:31:2b:11:b8:e8:39:a0 jsmith@local-host

然后,我从本地主机复制公钥的内容并将其粘贴到/home/jsmith/.ssh/authorized_keys远程主机上并运行:

[remote-host]$ chmod 755 ~/.ssh
[remote-host]$ chmod 644 ~/.ssh/authorized_keys

但如果我再次尝试登录,

[local-host]$ ssh  jsmith remote-host

但不是有以下消息:

Enter passphrase for key '/home/jsmith/.ssh/id_rsa': <Enter your passphrase here>
Last login: Sat Jun 07 2008 23:03:04 -0700 from 192.168.1.102
No mail.

我明白了:

jsmith remote-host's password:

我究竟做错了什么?

编辑

非常感谢您的回答和评论,我将尽力逐点解决:

  • 关于-l,我确实没有使用,但我使用了ssh jsmith@remote-host
  • 我运行以下命令并输出以下结果
[local-host]$ eval $(ssh-agent -s)
Agent pid 96546
[local-host]$ env | grep SSH
SSH_AUTH_SOCK=/var/folders/jq/yyp9q2fs1z5780k9l1_2ph4r0000gn/T//ssh-9ew9mjQCJWFK/agent.96545
SSH_AGENT_PID=96546

编辑2

然后我尝试了以下方法

[local-host]$ ssh-add .ssh/id_rsa
Enter passphrase for .ssh/id_rsa:
Bad passphrase, try again for .ssh/id_rsa:

编辑3

好的,远程计算机和本地计算机上的整个权限树如下:

/var/services/homes/user01/.ssh/

每个分支的权限如下(使用ls -ld <directory>和ls -la <file>命令(从下往上):

对于远程机器:

drwxr-xr-x 1 user01 users 0 Oct  3 16:44 .ssh
drwxrwxrwx+ 1 user01 users 90 Oct
lrwxrwxrwx 1 root root 14 Oct  4 09:07 homes -> /volume1/homes
drwxr-xr-x 2 root root 4096 Oct  4 09:07 services
drwxr-xr-x 15 root root 4096 Oct  4 09:07 var

对于本地机器:

drwx------  7 user02  staff   224B Oct  4 09:27 .ssh/
drwxr-xr-x+ 152 user02  staff   4.8K Oct  4 09:27 user02/
drwxr-xr-x  6 root  admin   192B Jan  1  2020 /Users/

你知道我下一步应该做什么吗?

提前谢谢了

ssh
  • 1 个回答
  • 109 Views
Martin Hope
ecjb
Asked: 2022-01-31 06:12:38 +0800 CST

仅使用 grep 输出包含模式的文件名(不带行输出)

  • 2

我想列出包含模式的文件,而不输出包含模式的行。我认为可以使用grep. 在这个意义上我应该如何使用grep?例如,以下命令给出所有文件中包含“stringpattern”(不区分大小写)的所有行.txt。我只想拥有文件的名称(±行号)。

grep -ni stringpattern *.txt

理想情况下,如果字符串/模式在一个文件中多次出现,我希望该文件有多行输出。

grep regular-expression
  • 2 个回答
  • 258 Views
Martin Hope
ecjb
Asked: 2021-10-24 09:07:52 +0800 CST

如何在不从头开始重新初始化通行证存储的情况下更改通行证程序中的关键词

  • 2

我正在使用pass我觉得非常方便的应用程序。我想更改关键词(母亲密码)。我查看了那里的手册页,但我不确定该怎么做。我必须使用init命令吗?是否可以在不从头开始重新初始化通行证存储的情况下更改密码?如果是,应该执行哪个确切的命令?

我从评论中尝试了以下内容:

非常感谢您的评论

所以我做了以下事情:

$ gpg --list-secret-keys

/Users/user/.gnupg/pubring.kbx
-------------------------------
sec   ....
      ....
uid           [ultimate] firstnamelastname <[email protected]>
ssb   ...

sec   ....
      ....
uid           [ultimate] Firstname Lastname <[email protected]>
ssb   ...

注意邮箱地址是一样的

没有文件 ~/.gnupg/gpg.conf。我创建了一个并default-key firstnamelastname在其中写入并获取它,但得到了

gpg.conf:1: command not found: default-key
password passwd
  • 1 个回答
  • 98 Views
Martin Hope
ecjb
Asked: 2020-02-10 06:18:07 +0800 CST

一次删除所有具有特定名称但扩展名不同的文件

  • 5

我有一个目录,其中包含以下文件集:

cheatsheetold.aux
cheatsheetold.log
cheatsheetold.out
cheatsheetold.pdf
cheatsheetold.synctex.gz
cheatsheetold.tex
cheatsheetnew.aux
cheatsheetnew.log
cheatsheetnew.out
cheatsheetnew.pdf
cheatsheetnew.synctex.gz
cheatsheetnew.tex

我想要做的是删除所有cheetsheetold.

cheatsheetold.aux
cheatsheetold.log
cheatsheetold.out
cheatsheetold.pdf
cheatsheetold.synctex.gz
cheatsheetold.tex

不接触cheatsheetnew

cheatsheetnew.aux
cheatsheetnew.log
cheatsheetnew.out
cheatsheetnew.pdf
cheatsheetnew.synctex.gz
cheatsheetnew.tex

我已经看过this other question,但它并没有解决问题,因为两个文件名都有一套完整的扩展名

terminal delete
  • 3 个回答
  • 1394 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

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

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve