gpt4 book ai didi

linux - find -exec 不运行 exec 部分

转载 作者:太空宇宙 更新时间:2023-11-04 05:35:22 27 4
gpt4 key购买 nike

我正在 UrbanCode Deploy Shell 步骤中执行以下命令。我想要的是针对找到的所有文件运行 Util.sh。

find . -type f -exec ls -al {} \;
find . -type f -exec Util.sh -import source= {} overwrite=true \;
Util.sh

输出如下,第二条命令根本没有运行。

delimiter specified is ,
executing script for all values in /app/bip/XMLP/Reports

-------------------------------
executing script for values: /app/bip/XMLP/Reports
/bin/sh /var/tmp/shell_command_5832071109593396198.tmp /app/bip/XMLP/Reports
-------------------------------
command output:
./BIP_Rollfoward/tmp/FlexPak/Asset_Allocation/Asset_Allocation.xdmz
./BIP_Rollfoward/tmp/FlexPak/Asset_Allocation/Asset_Allocation.xdoz
/var/tmp/shell_command_5832071109593396198.tmp: Util.sh: not found
===============================
command exit code: 1

最佳答案

我必须更改文件列表太长的目录的所有权,因此我使用了以下 find 命令。我会使用“\;”关闭执行程序,但它不起作用。

find /path/to/dir -name \* -exec chown user:group {} +

此代码适用于版本 6.1.3

关于linux - find -exec 不运行 exec 部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46793939/

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