可以使用 find 命令来遍历某个目录下不同层级的所有文件。例如,要遍历 /path/to/directory 目录下的所有文件,可以使用以下命令: find /path/to/directory -type f