📌  相关文章
📜  bash 对目录中的所有文件执行操作 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:53.147000             🧑  作者: Mango

代码示例1
# Basic syntax:
find . -maxdepth 1 -type f -exec your_command {} \;
# Where:
#    - . specifies the current directory (this can be changed to any
#        directory)
#    - -maxdepth 1 prevents find from searching directories recursively
#    - -type f specifies that the operation should only be performed on
#        files (not directories)
#    - -exec runs your_command on all files that are found