相关疑难解决方法(0)

为什么对 PATH 中的目录使用“-execdir”操作不安全?

为什么在使用-execdir时使用 find的操作组合不安全-exec

当我运行以下命令时,我收到以下提示消息:

/path/to/currentDir/$ find . -type f -name 'partOfFileNames*' -execdir rm -- {} +

find: The current directory is included in the PATH environment variable, which is insecure 
in combination with the -execdir action of find.  Please remove the current directory 
from your $PATH (that is, remove "." or leading or trailing colons)
Run Code Online (Sandbox Code Playgroud)

出现此提示的原因可能是什么?

command-line find environment-variables

21
推荐指数
2
解决办法
1万
查看次数

标签 统计

command-line ×1

environment-variables ×1

find ×1