gpt4 book ai didi

linux - 运行 shell 脚本时出现 PAM 对话错误

转载 作者:太空宇宙 更新时间:2023-11-04 12:40:52 25 4
gpt4 key购买 nike

我有一个 shell 脚本,我在其中运行以下命令:

cd system_xml
sudo find . -name "*.xml" | sudo xargs gzip

system_xml 包含大约 60K 个 xml 文件。我正在尝试查找所有原始 xml 文件并将其替换为该文件的 gzip 版本。

但是在运行这个文件大约 3 分钟后,我收到以下错误:

PAM conversation error

最佳答案

我更改了脚本以执行以下操作:

sudo bash;
find -type f -name '*.xml' | xargs gzip

无论出于何种原因,它都奏效了。如果不解释为什么这样做,我仍然不愿意接受这个答案。

你不能在管道中执行 2 个 sudo 程序吗?我知道 nohup 就是这种情况

关于linux - 运行 shell 脚本时出现 PAM 对话错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40254245/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com